FIX_CAL_PREMIUM
This commit is contained in:
parent
a5a5b6f9fc
commit
ef3283b933
@ -350,7 +350,7 @@ class EmployeeRestController extends AdminController
|
||||
$data['status']= 'draft';
|
||||
$data['date_coverage'] = $this->getEmployeeCoverageDate($emp_code, $client_policy_id);
|
||||
|
||||
dd($data);
|
||||
// dd($data);
|
||||
$this->employeePolicyModel->insert($data);
|
||||
|
||||
}
|
||||
@ -2310,8 +2310,15 @@ class EmployeeRestController extends AdminController
|
||||
$newData['date_coverage'] = $value['policy_details']['date_coverage'];
|
||||
$newData['policy_end_date'] = $value['policy_details']['policy_end_date'];
|
||||
$newData['days'] = $value['policy_details']['days'];
|
||||
|
||||
$this->employeePolicyModel->insert($newData);
|
||||
|
||||
|
||||
$isExistingEmpAndPolicy = $this->employeePolicyModel->where('employee_id',$value['temp']['emp_id'])->where('client_policy_id',$value['policy_details']['client_policy_id'])->where('is_active', 1)->get()->getRow();
|
||||
if($isExistingEmpAndPolicy)
|
||||
{
|
||||
$this->employeePolicyModel->where('employee_id',$value['temp']['emp_id'])->where('client_policy_id',$value['policy_details']['client_policy_id'])->where('is_active', 1)->set($newData)->update();
|
||||
}else{
|
||||
$this->employeePolicyModel->insert($newData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user