From 23865986e76d32203a738285eae71dcf0455c55b Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 20 Jan 2026 15:53:09 +0530 Subject: [PATCH] FIX_IAGREE_ADDON__NOT_ENROLLED_ISSUE --- app/Controllers/EmployeeRestController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 0507f77..69297b9 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -2749,7 +2749,13 @@ class EmployeeRestController extends AdminController ->where('id',$value) ->where('is_active', 1) ->first(); - $policy = $this->findThePolicyIsOpenForEnrollment($clientPolicyData['base_policy'], $emp_code); + + if(in_array($clientPolicyData['policy_type_id'], [3,4,5])){ + $policy = $this->findThePolicyIsOpenForEnrollment($clientPolicyData['base_policy'], $emp_code); + }else{ + $policy = $this->findThePolicyIsOpenForEnrollment($value, $emp_code); + } + if($policy) { $this->myLogger->logme("error", 'client policy id = '.$value.' is open for enrollment'); @@ -2792,7 +2798,6 @@ class EmployeeRestController extends AdminController } }else { $this->myLogger->logme("error", 'client policy id = '.$value.' is not open for enrollment');} - }