FIX_RELATED_ENROLMENTFILE_DOC_CAPTURE

This commit is contained in:
velz 2024-10-28 17:29:40 +05:30
parent afdc8bde2c
commit 13a8f999e5
5 changed files with 9 additions and 8 deletions

View File

@ -827,7 +827,7 @@ class EmployeeController extends AdminController
$res = $empServiceController->employeesOnboardPreprocess(['client_policy_id' => $client_policy_id,'client_branch_id' => $client_data['client_branch_id']]);
// dd($res);
$count = count($res);
$count = ($res);
$message = $count . ' Employees are Initiate Onboard Process againts Client ' . $client_data['client_name'] . ' and the Policy is ' . $client_data['policy_name'];
session()->setFlashdata('success1', $message);
return redirect()->to(base_url('/employee/upload'));

View File

@ -703,7 +703,7 @@ class EmployeeRestController extends AdminController
$file_name_with_path = WRITEPATH."/uploads/excel/".$filename;
//make an entry in DB
$file_id = $this->fileModel->insert(['file_name' => $filename, 'client_id' => $client_id, 'policy_id' => $policy_id, 'created_by' => $employee_id, 'status' => 'draft', 'action' => 'enrollment', 'client_branch_id' => $client_branch_id]); //here field policy_id have client_policy_id and not policy id from policy master
$file_id = $this->fileModel->insert(['file_name' => $filename, 'client_id' => $client_id, 'policy_id' => $policy_id, 'created_by' => $employee_id, 'status' => 'inprogress', 'action' => 'enrollment', 'client_branch_id' => $client_branch_id]); //here field policy_id have client_policy_id and not policy id from policy master
$this->myLogger->logme("error", '{file_id} - client uploaded success', ['file_id' => $file_id]);
$empServiceController = new EmployeeServiceController();
@ -834,7 +834,7 @@ class EmployeeRestController extends AdminController
'band'=> $extra['10'][$index],
'basic_pay'=> $extra['11'][$index],
'unit'=> isset($extra['12'][$index]) ? $extra['12'][$index] : null,
'client_branch_id' => $client_branch_id
'client_branch_id' => $client_branch_id,
'date_coverage' => $extra['13'][$index]
];
@ -925,7 +925,7 @@ class EmployeeRestController extends AdminController
'employee_id'=>$emp_id,
'client_policy_id'=>$policy_id,
'status'=> 'draft',
'date_coverage' => $date_coverage
'date_coverage' => $date_coverage,
'basic_cover_si'=>isset($basic_cover_si[$a]) ? $basic_cover_si[$a] : null
];
@ -967,6 +967,7 @@ class EmployeeRestController extends AdminController
}
}
$this->fileModel->where('id', $file_id)->set(['status' => 'success','reason' => '','error_data' => ''])->update();
return $this->respond(['status' => 'success', 'code' => 200, 'message' => "Success" ], 200);
}else{
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Client id and Client Policy id is Not Match!" ], 404);

View File

@ -1097,7 +1097,7 @@ class EmployeeServiceController extends AdminController
}// end of foreach
}// end of if current action I,DA,A
// s($result);
// return $result;
// die();
if(isset($result['error_summary']) && count($result['error_summary']))
{

View File

@ -1646,7 +1646,7 @@ if(!function_exists('get_premium_for_si'))
// dd($slab_details);
foreach ($slab_details as $skey => $slab_value)
{
if($slab_value['si'] == $si_amount && $slab_value['grade'] == $band && $slab_value['unit'] == $unit && $slab_value['max_si'] == 0)
if($slab_value['si'] == $si_amount && $slab_value['grade'] == $band && $slab_value['unit'] == $unit)
{
return $slab_value['premium'];
}

View File

@ -806,8 +806,8 @@ class EmployeePolicyModel extends Model
->where('emp.client_id',$client_id)
->where('employee_polices.client_policy_id',$policy_id);
$result->whereIn('employee_polices.status', ['draft', 'enrolled']);
$result->whereIn('emp.emp_status', ['draft', 'enrolled']);
$result->whereIn('employee_polices.status', ['enrolled']);
$result->whereIn('emp.emp_status', ['enrolled']);
$result = $result->findAll();
return ($result);
}