CHANGE_ in polict list openForEnrolemnt key and added policy_status key where in where condition : GWM
This commit is contained in:
parent
e80d3ac956
commit
b4cc2fb2a4
@ -1039,6 +1039,7 @@ public function getEmployeePolicy()
|
|||||||
$keysToRemove = ["removable_keys"];
|
$keysToRemove = ["removable_keys"];
|
||||||
// Retrieve employee policy data by passing the employee primary key
|
// Retrieve employee policy data by passing the employee primary key
|
||||||
$empPolicy = $this->employeeModel->getEmployeePolicy($id);
|
$empPolicy = $this->employeeModel->getEmployeePolicy($id);
|
||||||
|
|
||||||
// Retrieve employee and dependents data by passing the employee code
|
// Retrieve employee and dependents data by passing the employee code
|
||||||
$employeeData = $this->employeeModel->where('emp_code',$emp_code)->where('client_id',$client_id)
|
$employeeData = $this->employeeModel->where('emp_code',$emp_code)->where('client_id',$client_id)
|
||||||
->where('is_active', 1 )->where('is_addon_value',0)->findAll();
|
->where('is_active', 1 )->where('is_addon_value',0)->findAll();
|
||||||
@ -1062,6 +1063,7 @@ public function getEmployeePolicy()
|
|||||||
$array->SlabRates = $getSlabAndGridData['slab_rates'];
|
$array->SlabRates = $getSlabAndGridData['slab_rates'];
|
||||||
$array->GridMaster = $getSlabAndGridData['grid_master'];
|
$array->GridMaster = $getSlabAndGridData['grid_master'];
|
||||||
|
|
||||||
|
|
||||||
// Construct value for policy type GPA
|
// Construct value for policy type GPA
|
||||||
if($getSlabAndGridData['grid_master']['policy_type'] == "GPA"){
|
if($getSlabAndGridData['grid_master']['policy_type'] == "GPA"){
|
||||||
|
|
||||||
@ -1268,8 +1270,10 @@ public function getAddOnPolicy()
|
|||||||
$GMCEmployeeData = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('is_addon_value',0)->findAll();
|
$GMCEmployeeData = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('is_addon_value',0)->findAll();
|
||||||
|
|
||||||
|
|
||||||
$clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id'))->findAll();
|
$clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id'))
|
||||||
// dd($clientPolicy);
|
->where('policy_status', 1)
|
||||||
|
->findAll();
|
||||||
|
|
||||||
if(count($clientPolicy))
|
if(count($clientPolicy))
|
||||||
{
|
{
|
||||||
$PolicyData = [];
|
$PolicyData = [];
|
||||||
@ -1286,7 +1290,7 @@ public function getAddOnPolicy()
|
|||||||
$responce['client_id'] = $array['client_id'];
|
$responce['client_id'] = $array['client_id'];
|
||||||
$responce['client_policy_id'] = $array['id'];
|
$responce['client_policy_id'] = $array['id'];
|
||||||
$responce['is_addon'] = $array['is_addon'];
|
$responce['is_addon'] = $array['is_addon'];
|
||||||
$responce['open_for_enrollment'] = $array['open_for_enrollment'];
|
$responce['OpenForEnrollment'] = $array['open_for_enrollment'];
|
||||||
$responce['policy_terms'] = $decodedArray;
|
$responce['policy_terms'] = $decodedArray;
|
||||||
|
|
||||||
if(count($getSlabAndGridData['slab_rates'])){
|
if(count($getSlabAndGridData['slab_rates'])){
|
||||||
|
|||||||
@ -135,6 +135,7 @@ class EmployeeModel extends Model
|
|||||||
->select(' policies.name as Policy_Name , client_policy.policy_terms as Policy_Terms, client_policy.client_id as ClientId, client_policy.policy_id as PolicyId,client_policy.id as ClientPolicyId, client_policy.open_for_enrollment as OpenForEnrollment') // Select all columns from both tables
|
->select(' policies.name as Policy_Name , client_policy.policy_terms as Policy_Terms, client_policy.client_id as ClientId, client_policy.policy_id as PolicyId,client_policy.id as ClientPolicyId, client_policy.open_for_enrollment as OpenForEnrollment') // Select all columns from both tables
|
||||||
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
|
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
|
||||||
->join('policies', 'policies.id = client_policy.policy_id')
|
->join('policies', 'policies.id = client_policy.policy_id')
|
||||||
|
->where('client_policy.policy_status', 1)
|
||||||
->where('employee_polices.employee_id', $id)
|
->where('employee_polices.employee_id', $id)
|
||||||
->get()
|
->get()
|
||||||
->getResult();
|
->getResult();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user