fix financial and certificates
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrator;
|
||||
|
||||
use App\Http\Requests\ApiFormRequest;
|
||||
|
||||
class TrophyReportRequest extends ApiFormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'school_year' => ['nullable', 'string', 'max:50'],
|
||||
'percentile' => ['nullable', 'numeric', 'min:1', 'max:99'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CarryforwardAdjustmentRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'amount' => ['required','numeric','min:0'],
|
||||
'reason' => ['nullable','string','max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CarryforwardFinalizeRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'from_school_year' => ['required_without:id','string','max:20'],
|
||||
'to_school_year' => ['required_without:id','string','max:20'],
|
||||
'parent_id' => ['nullable','integer'],
|
||||
'reason' => ['nullable','string','max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CarryforwardPreviewRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'from_school_year' => ['required','string','max:20'],
|
||||
'to_school_year' => ['required','string','max:20'],
|
||||
'parent_id' => ['nullable','integer'],
|
||||
'minimum_balance' => ['nullable','numeric','min:0'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class EventChargeLifecycleRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'event_id' => ['nullable','integer'],
|
||||
'parent_id' => ['nullable','integer'],
|
||||
'student_id' => ['nullable','integer'],
|
||||
'school_year' => ['nullable','string','max:20'],
|
||||
'semester' => ['nullable','string','max:40'],
|
||||
'event_name' => ['nullable','string','max:255'],
|
||||
'title' => ['nullable','string','max:255'],
|
||||
'description' => ['nullable','string'],
|
||||
'amount' => ['nullable','numeric','min:0'],
|
||||
'invoice_id' => ['nullable','integer'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FinanceNotificationLogRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'status' => ['nullable','string','max:40'],
|
||||
'notification_type' => ['nullable','string','max:80'],
|
||||
'parent_id' => ['nullable','integer'],
|
||||
'date_from' => ['nullable','date'],
|
||||
'date_to' => ['nullable','date'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FollowUpNoteRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'invoice_id' => ['nullable','integer'],
|
||||
'school_year' => ['nullable','string','max:20'],
|
||||
'status' => ['nullable','string','max:60'],
|
||||
'contact_method' => ['nullable','string','max:60'],
|
||||
'promise_to_pay_date' => ['nullable','date'],
|
||||
'promise_to_pay_amount' => ['nullable','numeric','min:0'],
|
||||
'next_follow_up_date' => ['nullable','date'],
|
||||
'escalation_level' => ['nullable','integer','min:0','max:10'],
|
||||
'note' => ['nullable','string','max:10000'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class InstallmentPlanRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'plan_name' => ['nullable','string','max:120'],
|
||||
'total_amount' => ['nullable','numeric','min:0'],
|
||||
'number_of_installments' => ['required','integer','min:1','max:24'],
|
||||
'first_due_date' => ['required','date'],
|
||||
'interval_months' => ['nullable','integer','min:1','max:12'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ParentPaymentFollowUpRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'school_year' => ['nullable','string','max:20'],
|
||||
'date_from' => ['nullable','date'],
|
||||
'date_to' => ['nullable','date'],
|
||||
'minimum_balance' => ['nullable','numeric','min:0'],
|
||||
'aging_bucket' => ['nullable','string','max:40'],
|
||||
'parent_id' => ['nullable','integer'],
|
||||
'student_id' => ['nullable','integer'],
|
||||
'follow_up_status' => ['nullable','string','max:60'],
|
||||
'last_contacted_before' => ['nullable','date'],
|
||||
'next_follow_up_due_before' => ['nullable','date'],
|
||||
'promise_to_pay_due_before' => ['nullable','date'],
|
||||
'include_paid_invoices' => ['nullable','boolean'],
|
||||
'include_inactive_students' => ['nullable','boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class PaymentAllocationRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'installments' => ['nullable','array'],
|
||||
'installments.*.installment_id' => ['required_with:installments','integer'],
|
||||
'installments.*.amount' => ['required_with:installments','numeric','min:0.01'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
class StakeholderFinancialAnalysisRequest extends FinancialReportRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return array_merge(parent::rules(), [
|
||||
'compare_school_year' => ['nullable', 'string', 'max:20'],
|
||||
'include_monthly_trend' => ['nullable', 'boolean'],
|
||||
'include_parent_risk' => ['nullable', 'boolean'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ class GradingScoreUpdateRequest extends ApiFormRequest
|
||||
'score_ids' => ['nullable', 'array'],
|
||||
'scores' => ['nullable', 'array'],
|
||||
'comments' => ['nullable', 'array'],
|
||||
'score' => ['nullable', 'numeric'],
|
||||
'score' => ['nullable', 'numeric', 'min:0', 'max:100'],
|
||||
'comment' => ['nullable', 'string'],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user