migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HRM\Http\Requests\EmployeeSalary;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class EmployeeSalaryStoreRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'employee_id' => ['required', 'integer', 'exists:users,id'],
|
||||
'salary_month' => ['required', 'regex:/^\d{4}-(0[1-9]|1[0-2])$/'],
|
||||
'basic_salary' => ['required', 'numeric', 'min:0'],
|
||||
'allowances' => ['nullable', 'numeric', 'min:0'],
|
||||
'deductions' => ['nullable', 'numeric', 'min:0'],
|
||||
'overtime_hours' => ['nullable', 'numeric', 'min:0'],
|
||||
'overtime_rate' => ['nullable', 'numeric', 'min:0'],
|
||||
'bonus' => ['nullable', 'numeric', 'min:0'],
|
||||
'net_salary' => ['required', 'numeric', 'min:0'],
|
||||
'payment_date' => ['nullable', 'date'],
|
||||
'remarks' => ['nullable', 'string', 'max:2000'],
|
||||
'status' => ['required', 'in:pending,approved,paid'],
|
||||
'salary_breakdown' => ['nullable'],
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HRM\Http\Requests\EmployeeSalary;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class EmployeeSalaryUpdateRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'employee_id' => ['required', 'integer', 'exists:users,id'],
|
||||
'salary_month' => ['required', 'regex:/^\d{4}-(0[1-9]|1[0-2])$/'],
|
||||
'basic_salary' => ['required', 'numeric', 'min:0'],
|
||||
'allowances' => ['nullable', 'numeric', 'min:0'],
|
||||
'deductions' => ['nullable', 'numeric', 'min:0'],
|
||||
'overtime_hours' => ['nullable', 'numeric', 'min:0'],
|
||||
'overtime_rate' => ['nullable', 'numeric', 'min:0'],
|
||||
'bonus' => ['nullable', 'numeric', 'min:0'],
|
||||
'net_salary' => ['required', 'numeric', 'min:0'],
|
||||
'payment_date' => ['nullable', 'date'],
|
||||
'remarks' => ['nullable', 'string', 'max:2000'],
|
||||
'status' => ['required', 'in:pending,approved,paid'],
|
||||
'salary_breakdown' => ['nullable'],
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user