Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
d2a5155d70
@ -369,7 +369,7 @@ class EmployeeRestController extends AdminController
|
||||
$basic_cover_si = $policy_terms->sum_insured;
|
||||
}
|
||||
|
||||
$checkDataExist = $this->employeePolicyModel->where('employee_id',$employee_id)->where('client_policy_id',$client_policy_id)->first();
|
||||
$checkDataExist = $this->employeePolicyModel->where('employee_id',$employee_id)->where('client_policy_id',$client_policy_id)->where('is_active', 1)->first();
|
||||
|
||||
if($checkDataExist){
|
||||
|
||||
@ -1515,11 +1515,11 @@ class EmployeeRestController extends AdminController
|
||||
public function getGmcParrentsPolicy($GmcParrentsPolicy,$emp_code,$client_id,$client_branch_id)
|
||||
{
|
||||
|
||||
$employeeData = $this->employeeModel->where('emp_code',$emp_code)
|
||||
->where('client_id',$client_id)
|
||||
->where('client_branch_id',$client_branch_id)
|
||||
->where('is_active', 1 )
|
||||
->where('is_addon_value',0)->findAll();
|
||||
// $employeeData = $this->employeeModel->where('emp_code',$emp_code)
|
||||
// ->where('client_id',$client_id)
|
||||
// ->where('client_branch_id',$client_branch_id)
|
||||
// ->where('is_active', 1 )
|
||||
// ->where('is_addon_value',0)->findAll();
|
||||
// return $employeeData;
|
||||
foreach ($GmcParrentsPolicy as $key => $array) {
|
||||
|
||||
@ -1528,8 +1528,18 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
|
||||
// Reset employee array
|
||||
$empData = $employeeData;
|
||||
|
||||
// $empData = $employeeData;
|
||||
$empData = $this->employeeModel
|
||||
->select('employees.*')
|
||||
->join('employee_polices', 'employee_polices.employee_id = employees.id')
|
||||
->where('employees.emp_code',$emp_code)
|
||||
->where('employees.client_id',$client_id)
|
||||
->where('employees.client_branch_id',$client_branch_id)
|
||||
->where('employee_polices.client_policy_id',$array->ClientPolicyId)
|
||||
->where('employees.is_active', 1 )
|
||||
->where('employee_polices.is_active', 1 )
|
||||
->where('employees.is_addon_value',0)
|
||||
->findAll();
|
||||
|
||||
$array->Policy_Terms = json_decode($array->Policy_Terms);
|
||||
|
||||
@ -1543,6 +1553,7 @@ class EmployeeRestController extends AdminController
|
||||
->join('employee_polices', 'employee_polices.employee_id = employees.id')
|
||||
->where('employees.emp_code',$emp_code)
|
||||
->where('employees.is_active',1)
|
||||
->where('employee_polices.is_active',1)
|
||||
->where('employee_polices.client_policy_id',$array->ClientPolicyId)
|
||||
->get()
|
||||
->getResult();
|
||||
@ -3681,9 +3692,10 @@ class EmployeeRestController extends AdminController
|
||||
->join('employee_polices', 'employees.id = employee_polices.employee_id')
|
||||
->join('client_policy cp', 'employee_polices.client_policy_id = cp.id')
|
||||
->where('employees.is_active', 1)
|
||||
->whereIn('employees.emp_status', ['draft', 'enrolled'])
|
||||
->whereIn('employees.emp_status', ['draft'])
|
||||
->where('employees.family_floater_key', 'self')
|
||||
->where('employee_polices.is_active', 1)
|
||||
->whereIn('employee_polices.status', ['draft', 'enrolled'])
|
||||
->whereIn('employee_polices.status', ['draft'])
|
||||
->where('cp.enrolment_visibility', 1)
|
||||
->where('cp.open_for_enrollment', 1)
|
||||
->where('cp.policy_status', 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user