CHANGE_orderBy in getEmployeeAndDependenceByClientId API : GWM
This commit is contained in:
parent
b34ebf686c
commit
787e452a10
@ -79,13 +79,17 @@ class EmployeePolicyModel extends Model
|
|||||||
->join('tpa_branch tpab', 'cp.tpa_branch_id = tpab.id') //tpab - tpa brach
|
->join('tpa_branch tpab', 'cp.tpa_branch_id = tpab.id') //tpab - tpa brach
|
||||||
->join('clients cm', 'cp.client_id = cm.id') //cm - client master
|
->join('clients cm', 'cp.client_id = cm.id') //cm - client master
|
||||||
->where('emp.client_id',$client_id)
|
->where('emp.client_id',$client_id)
|
||||||
->where('employee_polices.client_policy_id',$policy_id);
|
->where('employee_polices.is_active',1)
|
||||||
|
->where('emp.is_active',1)
|
||||||
|
->where('employee_polices.client_policy_id',$policy_id)
|
||||||
|
->orderBy('emp.emp_code','ASC')->orderBy('employee_polices.employee_id','ASC');
|
||||||
|
|
||||||
|
|
||||||
if($status != 0 && !empty($status)){
|
if($status != 0 && !empty($status)){
|
||||||
$result->where('employee_polices.status', $status);
|
$result->where('employee_polices.status', $status);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $result->findAll();
|
$result = $result->findAll();
|
||||||
return ($result);
|
return ($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user