From 3ec08117ab042a298eba5d8b94a99c4730da841a Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Wed, 2 Jul 2025 10:29:54 +0530 Subject: [PATCH] CHANGE_ADD_INSURER_NAME_HR : RV --- app/Controllers/EmployeeRestController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index d46c085b..d9a89de8 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -33,6 +33,7 @@ use App\Models\TicketClaimStatusModel; use App\Models\TicketMasterModel; use App\Models\TicketMessageModel; use App\Models\HRAccessControlModel; +use App\Models\InsurerModel; @@ -85,6 +86,7 @@ class EmployeeRestController extends AdminController protected $ticketController; protected $hrAccessControlModel; + protected $insurerModel; public function __construct() @@ -115,6 +117,7 @@ class EmployeeRestController extends AdminController $this->ticketController = new TicketController(); $this->hrAccessControlModel = new HRAccessControlModel(); + $this->insurerModel = new InsurerModel(); } @@ -2313,7 +2316,7 @@ class EmployeeRestController extends AdminController - $ClientPolicyData = $this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type ') + $ClientPolicyData = $this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type, client_policy.policy_no as policy_no, client_policy.insurer_id as insurer_id ') ->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 ) @@ -2327,8 +2330,12 @@ class EmployeeRestController extends AdminController foreach ($ClientPolicyData as $key => $value) { $policyTypeData = $this->policyTypeModel->where('id',$value['policy_type_id'])->get()->getRow(); + $insurerData = $this->insurerModel->where('id',$value['insurer_id'])->get()->getRow(); + $value['type'] = $policyTypeData->policy_type; $value['policy_name'] = $policyTypeData->long_name; + $value['insurer_name'] = $insurerData->name; + $value['insurer_short_name'] = $insurerData->short_name; $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')); // dd($employeeDetails); $activeCount = 0;