From 9e661ad4c2d2fd5bf396b8d59e91cfa05582f81a Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Fri, 10 Oct 2025 15:13:38 +0530 Subject: [PATCH] FIX_LIVE_ISSUE_GTLI_TERMS : RV --- app/Controllers/EmployeeRestController.php | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 341bfcf2..1b7310b6 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -2868,14 +2868,14 @@ class EmployeeRestController extends AdminController }else if($ClientPolicyValue['policy_type_id'] == 6) { - $policyGroup = 'gpa'; + $policyGroup = 'other'; $data['ticket_type_id'] = 3; $data['claim_subject'] = "Claim EDLI"; $data['sum_insured_label'] = "Sum Assured"; }else if($ClientPolicyValue['policy_type_id'] == 7) { - $policyGroup = 'gpa'; + $policyGroup = 'other'; $data['ticket_type_id'] = 4; $data['claim_subject'] = "Claim GTLI"; $data['sum_insured_label'] = "Sum Assured"; @@ -2969,9 +2969,6 @@ class EmployeeRestController extends AdminController function policyTermsFiter($terms , $type) { - - - $gpa = [ "sumInsured2" => "Sum Insured", "totalSumInsured" => "Total Sum Assured", @@ -3021,8 +3018,6 @@ class EmployeeRestController extends AdminController "moderntreatmentsasperirdai" => "Modern Treatment " ]; - - $finalarray = []; if($type == 'gpa'){ foreach ($gpa as $key => $value) { @@ -3046,6 +3041,18 @@ class EmployeeRestController extends AdminController $finalarray[$terms->gpa_special_condition_label[$i]] = $terms->gpa_special_condition_input[$i]; } } + }else if($type == 'other'){ + foreach ($terms as $key => $value) { + if($key != "multiple_sum_insured" && $value != ""){ + $result = ucwords(str_replace('_', ' ', $key)); + $finalarray[$result] = $value; + } + } + if(isset(($terms->gpa_special_condition_label)) && is_array($terms->gpa_special_condition_label) && is_array($terms->gpa_special_condition_input)){ + for ($i=0; $i < count($terms->gpa_special_condition_label); $i++) { + $finalarray[$terms->gpa_special_condition_label[$i]] = $terms->gpa_special_condition_input[$i]; + } + } }else{ foreach ($gmc as $key => $value) { if(isset($terms->$key)) @@ -3070,9 +3077,7 @@ class EmployeeRestController extends AdminController } } - return $finalarray; - }