From 127a12d2351d19b88d015ea6ef879979960dd121 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Wed, 29 May 2024 12:19:10 +0530 Subject: [PATCH 1/6] CHANGE _ adding branch_id : GWM --- app/Controllers/EmployeeRestController.php | 129 +++++------------- .../RestAuthenticationController.php | 2 +- 2 files changed, 36 insertions(+), 95 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index daf246d7..67306e3c 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -84,10 +84,12 @@ class EmployeeRestController extends AdminController try { $emp_code = $this->request->getGet('emp_code'); $client_id = $this->request->getGet('client_id'); + $client_branch_id = $this->request->getGet('client_branch_id'); if ($emp_code) { $relationship = 'self'; $employee = $this->employeeModel->where('emp_code', $emp_code) ->where('client_id', $client_id) + ->where('client_branch_id', $client_branch_id) ->where('is_active', 1 ) ->where('relationship', $relationship) ->first(); @@ -102,7 +104,7 @@ class EmployeeRestController extends AdminController } } - + //not in use public function editEmployeeProfile() { try { @@ -125,7 +127,7 @@ class EmployeeRestController extends AdminController } - + //not in use public function getEmployeeAndDependence() { try { @@ -152,7 +154,7 @@ class EmployeeRestController extends AdminController } - + //not in use public function editEmployeeAndDependence() { try { @@ -372,6 +374,7 @@ class EmployeeRestController extends AdminController return null; } } + public function deleteDependence() { try { @@ -404,7 +407,7 @@ class EmployeeRestController extends AdminController public function getEmployeeAndDependenceByClientId() { try { - $empData = $this->employeePolicyModel->getEmployeePolicy( client_id:$this->request->getGet('client_id'),policy_id: $this->request->getGet('client_policy_id'),status:0); + $empData = $this->employeePolicyModel->getEmployeePolicy( client_id:$this->request->getGet('client_id'),policy_id: $this->request->getGet('client_policy_id'),status:0,client_branch_id:$this->request->getGet('client_branch_id')); if ($empData) { return $this->respond(['status' => 'success', 'code' => 200, 'data' => $empData], 200); @@ -934,7 +937,8 @@ public function getEmployeePolicy() $id = $this->request->getGet('id'); $emp_code = $this->request->getGet('emp_code'); - $client_id = $this->request->getGet('client_id'); + $client_id = $this->request->getGet('client_id'); + $client_branch_id = $this->request->getGet('client_branch_id'); // This is an array containing keys to be removed from the terms and conditions array $keysToRemove = ["removable_keys"]; @@ -942,8 +946,11 @@ public function getEmployeePolicy() $empPolicy = $this->employeeModel->getEmployeePolicy($id); // Retrieve employee and dependents data by passing the employee code - $employeeData = $this->employeeModel->where('emp_code',$emp_code)->where('client_id',$client_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(); if ($empPolicy) { @@ -1091,12 +1098,13 @@ public function getEmployeePolicy() ->where('client_policy.policy_type_id', 3 ) ->where('client_policy.is_addon', 1 ) ->where('client_policy.client_id', $this->request->getGet('client_id') ) + ->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') ) ->where('client_policy.is_active', 1 ) ->get() ->getResult(); if($checkGmcParentsPolicyExist) { - $GmcParrentsData = $this->getGmcParrentsPolicy($checkGmcParentsPolicyExist,$emp_code,$client_id); + $GmcParrentsData = $this->getGmcParrentsPolicy($checkGmcParentsPolicyExist,$emp_code,$client_id,$client_branch_id); return $this->respond(['status' => 'success','code' => 200,'data' => [$array,$GmcParrentsData]], 200); } @@ -1122,11 +1130,14 @@ public function getEmployeePolicy() } -public function getGmcParrentsPolicy($GmcParrentsPolicy,$emp_code,$client_id) +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('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(); foreach ($GmcParrentsPolicy as $key => $array) { @@ -1163,9 +1174,7 @@ public function getGmcParrentsPolicy($GmcParrentsPolicy,$emp_code,$client_id) $array->eCardDownload = null; } - // if($array->tpa_id != null){ - // $array->eCardDownload = base_url('download-e-card/') . $array->rand_string; - // }else{ $array->eCardDownload = null; } + $array->eCardDownload = null; // Map family floaters that already exist in the employee table @@ -1320,7 +1329,8 @@ public function getClientDetails() $client = $this->clientModel->where('id',$this->request->getGet('client_id'))->first(); if($client) { $client['client_logo'] = base_url().'public/uploads/logo/'.$client['client_logo']; - $clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id'))->findAll(); + $clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id')) + ->where('client_branch_id',$this->request->getGet('client_branch_id'))->findAll(); return $this->respond(['status' => 'success','code' => 200,'data' => ['client'=>$client,'client_policy'=>$clientPolicy]], 200); }else{ @@ -1335,17 +1345,22 @@ public function getAddOnPolicy() { try { - $addOnEmployeeData = $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',1)->findAll(); + $addOnEmployeeData = $this->employeeModel->where('is_active', 1 ) + ->where('emp_code',$this->request->getGet('emp_code')) + ->where('client_id',$this->request->getGet('client_id')) + ->where('client_branch_id',$this->request->getGet('client_branch_id')) + ->where('is_addon_value',1)->findAll(); $clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id')) + ->where('client_branch_id',$this->request->getGet('client_branch_id')) ->where('policy_status', 1) ->findAll(); if(count($clientPolicy)) { - $band = $addOnEmployeeData = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('family_floater_key','self')->get()->getRow()->band; + $band = $addOnEmployeeData = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('client_branch_id',$this->request->getGet('client_branch_id'))->where('family_floater_key','self')->get()->getRow()->band; $PolicyData = []; foreach ($clientPolicy as $key => $array) { $responce = []; @@ -1970,83 +1985,6 @@ public function removeEmpAndEmpPolicyData() } - - -function getEmployeeOldPolicy() -{ - $ClientPolicyData = $this->clientPolicyModel->select('client_policy.* , policies.name as policy_name , policy_type.policy_type as policy_type') - ->join('policies', 'client_policy.policy_id = policies.id', 'left') - ->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left') - ->where('client_policy.client_id', $this->request->getGet('client_id') ) - ->where('client_policy.is_active', 1 ) - ->where('client_policy.policy_status', 0) - ->orderby('client_policy.id' , 'ASC') - ->findAll(); - - // Retrieve employee and dependents data by passing the employee code - $employeeData = $this->employeeModel->where('emp_code',$this->request->getGet('emp_code')) - ->where('client_id',$this->request->getGet('client_id')) - ->where('is_active', 1 )->findAll(); - $whereArrayForId = []; - foreach ( $employeeData as $key => $value) { array_push($whereArrayForId, $value['id']); } - - if(count($ClientPolicyData) > 0 && count($employeeData) > 0) - { - $result = []; - foreach ($ClientPolicyData as $key => $ClientPolicyValue) { - - $terms = json_decode($ClientPolicyValue['policy_terms']); - // dd($terms); - $data['client_id'] = $ClientPolicyValue['client_id']; - $data['client_policy_id'] = $ClientPolicyValue['id']; - $data['policy_name'] = $ClientPolicyValue['policy_name']; - $data['policy_type'] = $ClientPolicyValue['policy_type']; - $data['policy_type'] = $ClientPolicyValue['policy_type']; - $data['policy_start_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_start_date']); - $data['policy_end_date'] = $this->convertDateFormatDisplay($ClientPolicyValue['policy_end_date']); - - if($ClientPolicyValue['policy_type_id'] == 1){ $data['heading'] = 'Group Personal Accident Coverage'; }else - if($ClientPolicyValue['policy_type_id'] == 2){ $data['heading'] = 'Group Medical Coverage'; }else - if($ClientPolicyValue['policy_type_id'] == 3){ $data['heading'] = 'Group Medical Coverage - Parents'; }else - if($ClientPolicyValue['policy_type_id'] == 4){ $data['heading'] = 'Group Medical Coverage - Top Up'; }else - if($ClientPolicyValue['policy_type_id'] == 5){ $data['heading'] = 'Group Medical Coverage - Parents (Top Up)'; } - - if($ClientPolicyValue['policy_type_id'] == 1){ $data['floter_text_heading'] = 'Sum Insured'; } - else - { - if($terms->family_floater == 1){ $data['floter_text_heading'] = 'Floter Sum Insured'; }else{ $data['floter_text_heading'] = 'Sum Insured'; } - } - - $employee_policy = $this->employeePolicyModel->select('employees.*,employee_polices.employee_id , employee_polices.basic_cover_si , employee_polices.premium , employee_polices.gst , employee_polices.tpa_id , employee_polices.rand_string') - ->join('employees', 'employee_polices.employee_id = employees.id', 'left') - ->whereIn('employee_polices.employee_id',$whereArrayForId) - ->where('employee_polices.client_policy_id',$ClientPolicyValue['id']) - ->where('employee_polices.is_active', 1 )->findAll(); - $si_value = 0; - $si_premium_value = 0; - $si_gst_value = 0; - foreach ($employee_policy as $key => $value) { - if(isset($value['basic_cover_si'])){ $si_value = $value['basic_cover_si']; } - if(isset($value['premium'])){ $si_premium_value = $si_premium_value + $value['premium'];} - if(isset($value['gst'])){ $si_gst_value = $si_gst_value + $value['gst'];} - } - - $data['si_value'] = $si_value; - $data['si_premium_value'] = ($ClientPolicyValue['policy_type_id'] == 1 || $ClientPolicyValue['policy_type_id'] == 2) ? 0 : $si_premium_value; - $data['si_gst_value'] = ($ClientPolicyValue['policy_type_id'] == 1 || $ClientPolicyValue['policy_type_id'] == 2) ? 0 : $si_gst_value; - - $data['EmployeePolicy'] = $employee_policy; - array_push($result, $data); - } - - return $this->respond(['status' => 'success','code' => 200,'data' => $result ], 200); - - }else{ - return $this->respond(['status' => 'failed','code' => 404,'data' => [] ], 200); - } - -} - function getEmployeeActiveOrInactivePolicy() { @@ -2055,6 +1993,7 @@ function getEmployeeActiveOrInactivePolicy() ->join('policies', 'client_policy.policy_id = policies.id', 'left') ->join('policy_type', 'client_policy.policy_type_id = policy_type.id', 'left') ->where('client_policy.client_id', $this->request->getGet('client_id') ) + ->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') ) ->where('client_policy.is_active', 1 ) ->where('client_policy.policy_status', $policy_status) ->orderby('client_policy.id' , 'ASC') @@ -2063,9 +2002,11 @@ function getEmployeeActiveOrInactivePolicy() // Retrieve employee and dependents data by passing the employee code $employeeData = $this->employeeModel->where('emp_code',$this->request->getGet('emp_code')) ->where('client_id',$this->request->getGet('client_id')) + ->where('client_branch_id',$this->request->getGet('client_branch_id')) ->where('is_active', 1 )->findAll(); $employeeName = $this->employeeModel->where('emp_code',$this->request->getGet('emp_code')) ->where('client_id',$this->request->getGet('client_id')) + ->where('client_branch_id',$this->request->getGet('client_branch_id')) ->where('family_floater_key','self')->where('is_active', 1 ) ->get()->getRow()->name; $whereArrayForId = []; diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 3af70fc4..72e7b8c7 100644 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -101,7 +101,7 @@ class RestAuthenticationController extends AdminController $auth = HttpRequestHelper::getRequestInfo(); if ($auth) { $data = [ - 'user_id' => $employeeData['id'], + 'user_id' => $employeeData['id'], 'user_type' => 'employee', 'ip' => $auth['ip'], 'platform' => $auth['platform'], From d16c0799bb76285996491b0d3f09699387e772c5 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Wed, 29 May 2024 12:26:10 +0530 Subject: [PATCH 2/6] CHANGE _ adding branch_id : GWM --- app/Controllers/EmployeeRestController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 67306e3c..81529bc7 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -407,7 +407,7 @@ class EmployeeRestController extends AdminController public function getEmployeeAndDependenceByClientId() { try { - $empData = $this->employeePolicyModel->getEmployeePolicy( client_id:$this->request->getGet('client_id'),policy_id: $this->request->getGet('client_policy_id'),status:0,client_branch_id:$this->request->getGet('client_branch_id')); + $empData = $this->employeePolicyModel->getEmployeePolicy( client_id:$this->request->getGet('client_id'),policy_id: $this->request->getGet('client_policy_id'),status:0,branch_id:$this->request->getGet('client_branch_id')); if ($empData) { return $this->respond(['status' => 'success', 'code' => 200, 'data' => $empData], 200); @@ -426,7 +426,8 @@ class EmployeeRestController extends AdminController public function exportDataByClientPolicyId() { try { - $empData = $this->employeePolicyModel->getEmployeePolicy( client_id:$this->request->getGet('client_id'),policy_id: $this->request->getGet('client_policy_id'),status:0); + + $empData = $this->employeePolicyModel->getEmployeePolicy( client_id:$this->request->getGet('client_id'),policy_id: $this->request->getGet('client_policy_id'),status:0,branch_id:$this->request->getGet('client_branch_id')); if(count($empData)) { @@ -1783,6 +1784,7 @@ public function getCashDepositData() $ClientPolicyData = $this->clientPolicyModel->select('client_policy.client_id as clientId , client_policy.insurer_id as insurerId,insurers.name as insurer_name') ->join('insurers', 'client_policy.insurer_id = insurers.id', 'left') ->where('client_policy.client_id', $this->request->getGet('client_id') ) + ->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') ) ->where('client_policy.is_active', 1 ) ->where('client_policy.policy_status', 1) ->groupBy('client_policy.insurer_id') @@ -1812,7 +1814,7 @@ public function getCashDepositData() { $value['type'] = $this->policyTypeModel->where('id',$value['policy_type_id'])->get()->getRow()->policy_type; - $employeeDetails = $this->employeePolicyModel->getEmployeePolicy( client_id:$value['client_id'],policy_id: $value['client_policy_id'],status:0); + $employeeDetails = $this->employeePolicyModel->getEmployeePolicy( client_id:$value['client_id'],policy_id: $value['client_policy_id'],status:0,branch_id:$this->request->getGet('client_branch_id')); $enrolledCount = 0; $draftCount = 0; if(count($employeeDetails)) From 0d17c1692b04f73c8f557fb19d2054e87390a92c Mon Sep 17 00:00:00 2001 From: bitbucket Date: Wed, 29 May 2024 13:27:34 +0530 Subject: [PATCH 3/6] CHANGE_ adding branch_id : GWM --- app/Controllers/EmployeeRestController.php | 142 +++++++++++---------- 1 file changed, 74 insertions(+), 68 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 81529bc7..09dff202 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -403,6 +403,73 @@ class EmployeeRestController extends AdminController } + // Get the RelationShip list + public function createOrUpdateEmployeePolicySiAmount() + { + + try { + $requestData = $this->request->getJSON(); + + foreach ($requestData as $key => $value) { + + + $checkIfExist = $this->employeePolicyModel->where('employee_id', $value->employee_id) + ->where('client_policy_id', $value->client_policy_id) + ->where('is_active', 1 ) + ->findAll(); + + + // dd($checkIfExist); + if ($checkIfExist) { + + $empPolicy = $this->employeePolicyModel->updateSiAndPremium($value->client_policy_id, $value->employee_id, $value->basic_cover_si); + + }else{ + + $data['employee_id']= $value->employee_id; + $data['client_policy_id']= $value->client_policy_id; + $data['basic_cover_si']= $value->basic_cover_si; + $data['status'] = 'draft'; + + $this->employeePolicyModel->insert($data); + } + } + + $this->updatePremiumAmount($requestData[0]->client_policy_id , $requestData[0]->emp_code); + + return $this->respond(['status' => 'success','code' => 200,'data' => []], 200); + + } catch (\Exception $e) { + return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()], 500); + } + } + + public function findPremiumAmount($slabArray,$siAmount) + { + foreach ($slabArray as $key => $value) { + if($value['si'] == $siAmount){ + return $value['premium']; + break; + } + } + } + + public function relationshipList() + { + try { + + $relation_ships= $this->relationshipModel->findAll(); + + if(count($relation_ships) > 0){ + return $this->respond(['status' => 'success','code' => 200,'data' => $relation_ships], 200); + }else{ + return $this->respond(['status' => 'success','code' => 200,'data' => "No Data..!"], 200); + } + + } catch (\Exception $e) { + return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()], 500); + } + } public function getEmployeeAndDependenceByClientId() { @@ -422,7 +489,6 @@ class EmployeeRestController extends AdminController } - public function exportDataByClientPolicyId() { try { @@ -500,6 +566,7 @@ class EmployeeRestController extends AdminController } + //not in use public function getClientPolicy() { try { @@ -538,73 +605,7 @@ class EmployeeRestController extends AdminController - // Get the RelationShip list - public function createOrUpdateEmployeePolicySiAmount() - { - - try { - $requestData = $this->request->getJSON(); - - foreach ($requestData as $key => $value) { - - - $checkIfExist = $this->employeePolicyModel->where('employee_id', $value->employee_id) - ->where('client_policy_id', $value->client_policy_id) - ->where('is_active', 1 ) - ->findAll(); - - - // dd($checkIfExist); - if ($checkIfExist) { - - $empPolicy = $this->employeePolicyModel->updateSiAndPremium($value->client_policy_id, $value->employee_id, $value->basic_cover_si); - - }else{ - - $data['employee_id']= $value->employee_id; - $data['client_policy_id']= $value->client_policy_id; - $data['basic_cover_si']= $value->basic_cover_si; - $data['status'] = 'draft'; - - $this->employeePolicyModel->insert($data); - } - } - - $this->updatePremiumAmount($requestData[0]->client_policy_id , $requestData[0]->emp_code); - - return $this->respond(['status' => 'success','code' => 200,'data' => []], 200); - - } catch (\Exception $e) { - return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()], 500); - } - } - - public function findPremiumAmount($slabArray,$siAmount) - { - foreach ($slabArray as $key => $value) { - if($value['si'] == $siAmount){ - return $value['premium']; - break; - } - } - } - public function relationshipList() - { - try { - - $relation_ships= $this->relationshipModel->findAll(); - - if(count($relation_ships) > 0){ - return $this->respond(['status' => 'success','code' => 200,'data' => $relation_ships], 200); - }else{ - return $this->respond(['status' => 'success','code' => 200,'data' => "No Data..!"], 200); - } - - } catch (\Exception $e) { - return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()], 500); - } - } // Upload the Employee Detail in DB by Sheet Data public function employeeUpload() @@ -618,6 +619,7 @@ class EmployeeRestController extends AdminController // die; $file = $this->request->getFile('file'); $client_id = $this->request->getPost('client_id'); + $client_branch_id = $this->request->getPost('client_branch_id'); $policy_id = $this->request->getPost('policy_id'); $client_data = $this->clientModel->where('id', $client_id)->first(); @@ -636,7 +638,7 @@ class EmployeeRestController extends AdminController - $client_policy = $this->clientPolicyModel->where('id', $policy_id)->where('client_id', $client_id)->first(); + $client_policy = $this->clientPolicyModel->where('id', $policy_id)->where('client_id', $client_id)->where('client_branch_id', $client_branch_id)->first(); if ($client_policy) { $policy = $this->policesModel->where('id', $client_policy['policy_id'])->first(); $policy_permium_1 = $this->policyPremium1Model->where(['client_id' => $client_id , 'client_policy_id' => $policy_id,'is_active' =>1])-> first(); @@ -670,6 +672,7 @@ class EmployeeRestController extends AdminController $extractData['file_name']= $filename; $extractData['client_id']= $client_id; + $extractData['client_branch_id']= $client_branch_id; $extractData['status']= 'success'; $extractData['policy_id']= $policy_id; $extractData['action']= 'enrollment'; @@ -932,6 +935,7 @@ public function getAgeRange($terms,$familyFloatesValue) } + public function getEmployeePolicy() { try { @@ -1266,6 +1270,7 @@ public function getGmcParrentsPolicy($GmcParrentsPolicy,$emp_code,$client_id,$cl } } + public function FloterConvertion($array){ $result = []; @@ -1806,6 +1811,7 @@ public function getCashDepositData() ->join('policies', 'client_policy.policy_id = policies.id', 'left') ->where('client_policy.insurer_id', $value['insurerId'] ) ->where('client_policy.client_id', $this->request->getGet('client_id') ) + ->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id') ) ->where('client_policy.is_active', 1 ) ->where('client_policy.policy_status', 1) ->findAll(); From 499ed67fdd35392c4b57f9d8405126b18300d99d Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Wed, 29 May 2024 18:11:51 +0530 Subject: [PATCH 4/6] CHANGE_HEADER_HELPDESK_URL_SET : AADHAVAN --- app/Views/layout/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 9cc606ba..9c6a4795 100644 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -590,7 +590,7 @@ $parsedUrl = parse_url($currentUrl); $baseUrl = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . '/'; $hashedEmail = hash('sha256', $sessionData->email); - $redirectUrl = $baseUrl . getenv('hepldeskURL') .'/staff/login?' . http_build_query(['token' => $hashedEmail]); + $redirectUrl = getenv('helpdeskURL') .'/staff/login?' . http_build_query(['token' => $hashedEmail]); ?> From c69d9747113d89e3c0fd3c28c47d3f7be4dcd4d8 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Thu, 30 May 2024 10:24:47 +0530 Subject: [PATCH 5/6] CHANHE_ in emplayee upload API : GWM --- app/Controllers/EmployeeRestController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 09dff202..0bbe620c 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -874,6 +874,7 @@ class EmployeeRestController extends AdminController foreach ($employee_policy as $existing_policy) { $emp_policy_data['id']= $existing_policy['id']; $emp_policy_data['updated_at'] = $formatted_date_time; + $emp_policy_data['client_branch_id'] = $client_branch_id; $this->employeePolicyModel->save($emp_policy_data); } } else { From 8326b3c1f02df9a8fcfb40dae422962702d41810 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Thu, 30 May 2024 10:39:46 +0530 Subject: [PATCH 6/6] CHANHE_ in emplayee upload API : GWM --- app/Controllers/EmployeeRestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 0bbe620c..3c51bae9 100644 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -779,6 +779,7 @@ class EmployeeRestController extends AdminController 'client_id' => $client_id, 'emp_status'=>'draft', 'band'=> $extra['10'][$index], + 'client_branch_id' => $client_branch_id ]; $basic_cover_si_value = null; @@ -874,7 +875,6 @@ class EmployeeRestController extends AdminController foreach ($employee_policy as $existing_policy) { $emp_policy_data['id']= $existing_policy['id']; $emp_policy_data['updated_at'] = $formatted_date_time; - $emp_policy_data['client_branch_id'] = $client_branch_id; $this->employeePolicyModel->save($emp_policy_data); } } else {