Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
710ae1efa9
@ -1619,9 +1619,17 @@ class EmployeeServiceController extends AdminController
|
||||
}
|
||||
|
||||
$this->employeeModel->save($value);
|
||||
$emp_id = $this->employeeModel->getInsertID();
|
||||
if($emp_id != 0){ $log_message .= $emp_id; }
|
||||
else{ $emp_id = $employee[0]['id']; }
|
||||
if (isset($value['id'])) {
|
||||
$emp_id = $value['id'];
|
||||
} else {
|
||||
$emp_id = $this->employeeModel->getInsertID();
|
||||
$log_message .= $emp_id;
|
||||
}
|
||||
|
||||
//commanded for last insert id is coming from buffer
|
||||
// $emp_id = $this->employeeModel->getInsertID();
|
||||
// if($emp_id != 0){ $log_message .= $emp_id; }
|
||||
// else{ $emp_id = $employee[0]['id']; }
|
||||
|
||||
$this->myLogger->logme('error',$log_message);
|
||||
|
||||
@ -1647,7 +1655,14 @@ class EmployeeServiceController extends AdminController
|
||||
}
|
||||
|
||||
$this->employeePolicyModel->save($policy_data);
|
||||
$emp_policy_id = $this->employeePolicyModel->getInsertID();
|
||||
if(isset($policy_data['id']))
|
||||
{
|
||||
$emp_policy_id = $policy_data['id'];
|
||||
}else
|
||||
{
|
||||
$emp_policy_id = $this->employeePolicyModel->getInsertID();
|
||||
}
|
||||
|
||||
if($emp_policy_id != 0)//emp policy inserted
|
||||
{
|
||||
$log_message .= ' with PK ' . $emp_policy_id;
|
||||
@ -1663,7 +1678,7 @@ class EmployeeServiceController extends AdminController
|
||||
}
|
||||
|
||||
}
|
||||
else{ $emp_policy_id = $employee_policy[0]['id']; }
|
||||
// else{ $emp_policy_id = $employee_policy[0]['id']; }
|
||||
|
||||
$this->myLogger->logme('error',$log_message);
|
||||
|
||||
@ -2004,9 +2019,15 @@ public function employeesEnrollmentInsert($params)
|
||||
}
|
||||
|
||||
$this->employeeModel->save($value);
|
||||
$emp_id = $this->employeeModel->getInsertID();
|
||||
if($emp_id != 0){ $log_message .= $emp_id; }
|
||||
else{ $emp_id = $employee['id']; }
|
||||
if (isset($value['id']))
|
||||
{ $emp_id = $value['id']; }
|
||||
else { $emp_id = $this->employeeModel->getInsertID();
|
||||
$log_message .= $emp_id;
|
||||
}
|
||||
|
||||
// $emp_id = $this->employeeModel->getInsertID();
|
||||
// if($emp_id != 0){ $log_message .= $emp_id; }
|
||||
// else{ $emp_id = $employee['id']; }
|
||||
|
||||
$this->myLogger->logme('error',$log_message);
|
||||
|
||||
|
||||
@ -1133,7 +1133,10 @@ if (!function_exists('premium_calculation_manager'))
|
||||
$insurer = ($insurer->find($policy_terms['insurer_id']));
|
||||
if($insurer['addition_add_day'] == true)
|
||||
{
|
||||
$emp_data['policy_details']['date_coverage'] = (new DateTime($emp_data['policy_details']['date_coverage']))->modify('+1 day')->format('Y-m-d');
|
||||
// $emp_data['policy_details']['date_coverage'] = (new DateTime($emp_data['policy_details']['date_coverage']))->modify('+1 day')->format('Y-m-d');
|
||||
|
||||
$emp_data['policy_details']['date_coverage'] = isset($emp_data['policy_details']['date_coverage']) && $emp_data['policy_details']['date_coverage'] != '' && $emp_data['policy_details']['date_coverage'] != null ?
|
||||
(new DateTime($emp_data['policy_details']['date_coverage']))->modify('+1 day')->format('Y-m-d') : null ;
|
||||
}
|
||||
}
|
||||
// dd($emp_data);
|
||||
|
||||
@ -466,3 +466,12 @@ function numberToWords($number)
|
||||
|
||||
return $number; // Fallback for numbers beyond the supported range
|
||||
}
|
||||
|
||||
if (!function_exists('print_rr')) {
|
||||
function print_rr($data)
|
||||
{
|
||||
echo "<pre>";
|
||||
print_r($data);
|
||||
echo "</pre>";
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user