latest commit 11-06-2025
This commit is contained in:
parent
2bef105d7c
commit
b8e9e64cfd
@ -232,12 +232,15 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
// dd($data);
|
||||
|
||||
$validationFailed = $this->employeeHelper->validation_addEmployeeAndDependence($data);
|
||||
if ( ! isset($data[0]->id) ) {
|
||||
$validationFailed = $this->employeeHelper->validation_addEmployeeAndDependence($data);
|
||||
|
||||
if($validationFailed){
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => "validation_addEmployeeAndDependence failed ..!!"], 404);
|
||||
if($validationFailed){
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => "validation_addEmployeeAndDependence failed ..!!"], 404);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$openForEnrollment = $this->findThePolicyIsOpenForEnrollment($data[0]->client_policy_id);
|
||||
if($openForEnrollment == false){ return $this->respond(['status' => 'failed','code' => 404,'data' => 'Enrollment closed'], 404); }
|
||||
|
||||
|
||||
@ -30,12 +30,12 @@ class EmployeeHelper
|
||||
public function validation_addEmployeeAndDependence($data){
|
||||
|
||||
|
||||
$employeeData = $this->employeeModel->where('emp_code',$data[0]->emp_code)
|
||||
->where('client_id',$data[0]->client_id)
|
||||
->where('client_branch_id',$data[0]->client_branch_id)
|
||||
->where('is_active', 1 )
|
||||
->where('is_addon_value',0)
|
||||
->findAll();
|
||||
$employeeData = $this->employeeModel->where('emp_code',$data[0]->emp_code)
|
||||
->where('client_id',$data[0]->client_id)
|
||||
->where('client_branch_id',$data[0]->client_branch_id)
|
||||
->where('is_active', 1 )
|
||||
->where('is_addon_value',0)
|
||||
->findAll();
|
||||
|
||||
$arr [] = $data;
|
||||
|
||||
@ -81,7 +81,7 @@ class EmployeeHelper
|
||||
if(isset($employee_policy->payable_employee) && $employee_policy->payable_employee == 1)
|
||||
{
|
||||
if(isset($employee_policy->rata_premimum)){ $dependent_and_si_premium_value = $dependent_and_si_premium_value + $employee_policy->rata_premimum;}
|
||||
if(isset($employee_policy->gst)){ $dependent_and_si_gst_value = $dependent_and_si_gst_value + $employee_policy->gst;}
|
||||
if(isset($employee_policy->gst)){ $dependent_and_si_gst_value = $dependent_and_si_gst_value + $employee_policy->gst;}
|
||||
}
|
||||
|
||||
$temp['is_value_exist'] = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user