From c75cedac0c488c8ec1c667352bae9b77b441425b Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Thu, 27 Feb 2025 15:27:12 +0530 Subject: [PATCH 1/5] CHANGE : active policy check in login api --- .../RestAuthenticationController.php | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 56c65ff8..752d116c 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -71,13 +71,20 @@ class RestAuthenticationController extends AdminController $mobile_number = $this->request->getJSON()->mobile_number; - $employeeData = $this->employeeModel->where('mobile', $mobile_number) - ->where('relationship', 'self') - ->where('emp_status !=', 'truncated') - ->where('is_active', 1) - ->first(); + $employeeData = $this->employeeModel->select('employees.relationship,EP.employee_id') + ->join('employee_polices EP', 'EP.employee_id = employees.id', 'inner') + ->where('employees.is_active', 1) + ->where('employees.relationship', 'self') + ->where('employees.emp_status !=', 'truncated') + ->where('employees.mobile', $mobile_number) + ->where('EP.is_active', 1) + ->whereIn('EP.status', ['active']) + ->first(); + + - if ($employeeData) { + if (isset($employeeData['employee_id'])) + { $result = ['user_verification' => true ,'message' => "Verified Successfully"]; return $this->respond(['status' => 'success','code' => 200,'data' => $result],200); @@ -97,11 +104,18 @@ class RestAuthenticationController extends AdminController $email = $this->request->getJSON()->email; - $employeeData = $this->employeeModel->where('email_corporate', $email)->where('relationship', 'self') - ->where('emp_status !=', 'truncated')->where('is_active', 1) + $employeeData = $this->employeeModel->select('employees.relationship,EP.employee_id') + ->join('employee_polices EP', 'EP.employee_id = employees.id', 'inner') + ->where('employees.is_active', 1) + ->where('employees.relationship', 'self') + ->where('employees.emp_status !=', 'truncated') + ->where('employees.email_corporate', $email) + ->where('EP.is_active', 1) + ->whereIn('EP.status', ['active']) ->first(); - if ($employeeData) { + if (isset($employeeData['employee_id'])) + { $otp = random_int(100000, 999999); From 88f5c90d171af04e23260f50aaf0f839c8663c43 Mon Sep 17 00:00:00 2001 From: Srinivas-Saravanan Date: Thu, 27 Feb 2025 16:07:32 +0530 Subject: [PATCH 2/5] FEAT_RFQ_NON_EB_INITIAL_COMMIT_SRI --- app/Config/Routes.php | 1 + app/Controllers/LeadsController.php | 5 + app/Views/ticket_form_gmc.php | 4 +- app/Views/view_rfq.php | 2 +- app/Views/view_rfq_non_eb.php | 1905 +++++++++++++++++++++++++++ 5 files changed, 1914 insertions(+), 3 deletions(-) create mode 100644 app/Views/view_rfq_non_eb.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index b77e8f5e..e116fcd1 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -404,6 +404,7 @@ $routes->group("rfq", ["filter" => "authMVC"], function ($routes) { $routes->post("create", "LeadsController::createRFQ"); $routes->post("createQCR", "LeadsController::createQCR"); $routes->get("list/(:any)", "LeadsController::viewRFQ/$1"); + $routes->get("nonEB","LeadsController::rfqNonEB"); }); diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index abbc6984..f0f1cc7b 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -2384,6 +2384,11 @@ class LeadsController extends BaseController return $financialYears; } + + public function rfqNonEB(){ + + $this->loadLayout('view_rfq_non_eb'); + } diff --git a/app/Views/ticket_form_gmc.php b/app/Views/ticket_form_gmc.php index 099cf7ad..94a90e64 100644 --- a/app/Views/ticket_form_gmc.php +++ b/app/Views/ticket_form_gmc.php @@ -230,7 +230,7 @@
- + @@ -335,7 +335,7 @@
diff --git a/app/Views/view_rfq.php b/app/Views/view_rfq.php index e3ca071d..9d619d2a 100644 --- a/app/Views/view_rfq.php +++ b/app/Views/view_rfq.php @@ -5666,7 +5666,7 @@ function autoCaluculationForPremiumChildTable(input) { .qcr === 0); if (actionData) first_json.table_data.data.splice(rowKey, 1); }); - + console.log("Modified JSON:", first_json); return first_json; } diff --git a/app/Views/view_rfq_non_eb.php b/app/Views/view_rfq_non_eb.php new file mode 100644 index 00000000..13ba40c8 --- /dev/null +++ b/app/Views/view_rfq_non_eb.php @@ -0,0 +1,1905 @@ + +
+
+
+ +
+
+

+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ + \ No newline at end of file From 6fccab95bc0fd4d75f199dca10ec75ee0451bb14 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Thu, 27 Feb 2025 17:05:57 +0530 Subject: [PATCH 3/5] CHANGE : active policy check in login api --- app/Controllers/EmployeeRestController.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 5b24dafe..94a28fb6 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -2534,26 +2534,34 @@ class EmployeeRestController extends AdminController - $terms = json_decode($ClientPolicyValue['policy_terms']); + if($ClientPolicyValue['policy_type_id'] == 1) { - $data['policy_terms'] = $this->policyTermsFiter($terms,'gpa'); + $policyGroup = 'gpa'; $data['ticket_type_id'] = 2; }else if($ClientPolicyValue['policy_type_id'] == 6) { - $data['policy_terms'] = $this->policyTermsFiter($terms,'gpa'); + $policyGroup = 'gpa'; $data['ticket_type_id'] = 3; }else if($ClientPolicyValue['policy_type_id'] == 7) { - $data['policy_terms'] = $this->policyTermsFiter($terms,'gpa'); + $policyGroup = 'gpa'; $data['ticket_type_id'] = 4; }else { - $data['policy_terms'] = $this->policyTermsFiter($terms,'gmc'); + $policyGroup = 'gmc'; $data['ticket_type_id'] = 1; } - + + $terms = json_decode($ClientPolicyValue['policy_terms'] , true); + $data['policy_terms'] = isset($terms['enrollment_display_key']) + && !empty($terms['enrollment_display_key']) + ? $terms['enrollment_display_key'] + : $this->policyTermsFiter($terms, $policyGroup); + $terms = json_decode($ClientPolicyValue['policy_terms']); + + $data['client_id'] = $ClientPolicyValue['client_id']; $data['client_policy_id'] = $ClientPolicyValue['id']; $data['policy_name'] = $ClientPolicyValue['policy_type']; From 419fdde419a8335d1d869605cd8de323f0e8e5ae Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Thu, 27 Feb 2025 18:00:03 +0530 Subject: [PATCH 4/5] CHANGE_CLAIMS_MODULE : RV --- .../policy_transaction_inception_form.php | 58 +++++++++++-- app/Views/ticket_form_gmc.php | 84 ++++++++++--------- app/Views/ticket_form_gpa.php | 56 +++++++------ 3 files changed, 123 insertions(+), 75 deletions(-) diff --git a/app/Views/policy_transaction_inception_form.php b/app/Views/policy_transaction_inception_form.php index 2c06d68b..5b7ebdd3 100644 --- a/app/Views/policy_transaction_inception_form.php +++ b/app/Views/policy_transaction_inception_form.php @@ -1748,18 +1748,46 @@ function checkAndDistributeTax(input) let sgst = parseFloat($('#sgst_' + input).val()); let igst = parseFloat($('#igst_' + input).val()); - if(((event.target.id).startsWith('cgst') || (event.target.id).startsWith('sgst') )) - { - if(cgst !== 0) { $('#sgst_' + input).val(cgst); } - else if(sgst !== 0) { $('#cgst_' + input).val(sgst); } + // if(((event.target.id).startsWith('cgst') || (event.target.id).startsWith('sgst') )) + // { + // if(cgst !== 0) { $('#sgst_' + input).val(cgst); } + // else if(sgst !== 0) { $('#cgst_' + input).val(sgst); } + // $('#igst_' + input).val(0); + // } + // else if((event.target.id).startsWith('igst')) + // { + // $('#cgst_' + input).val(0); + // $('#sgst_' + input).val(0); + // } + + if (((event.target.id).startsWith('cgst') || (event.target.id).startsWith('sgst'))) { + + if (!isFinite(cgst) || isNaN(cgst) || cgst === undefined) { + cgst = 0; + } + if (!isFinite(sgst) || isNaN(sgst) || sgst === undefined) { + sgst = 0; + } + + if (cgst !== 0) { + $('#sgst_' + input).val(cgst); + } else if (sgst !== 0) { + $('#cgst_' + input).val(sgst); + } + $('#igst_' + input).val(0); - } - else if((event.target.id).startsWith('igst')) - { + } + else if ((event.target.id).startsWith('igst')) { $('#cgst_' + input).val(0); $('#sgst_' + input).val(0); } + + // Ensure IGST, CGST, and SGST are never NaN, undefined, or Infinity + $('#igst_' + input).val(isFinite($('#igst_' + input).val()) ? $('#igst_' + input).val() : 0); + $('#cgst_' + input).val(isFinite($('#cgst_' + input).val()) ? $('#cgst_' + input).val() : 0); + $('#sgst_' + input).val(isFinite($('#sgst_' + input).val()) ? $('#sgst_' + input).val() : 0); + } function amountCalculation(input) { @@ -2293,11 +2321,21 @@ $(document).on('change', '[name="base_premium[]"], [name="co_share_per[]"]', fun let basePremium = $('input[name="base_premium[]"]').toArray() .map(input => parseFloat($(input).val()) || 0) .find(value => value > 0) || 0; + + let tpPremium = $('input[name="tp_premium[]"]').toArray() + .map(input => parseFloat($(input).val()) || 0) + .find(value => value > 0) || 0; + + let terPremium = $('input[name="tp_premium[]"]').toArray() + .map(input => parseFloat($(input).val()) || 0) + .find(value => value > 0) || 0; console.log('Base Premium:', basePremium); + console.log('TP Premium:', tpPremium); // Loop through all co_share_per[] fields $('input[name="co_share_per[]"]').each(function(index) { + const coSharePer = parseFloat($(this).val()) || 0; // Get co_share_per value const coPremium = (basePremium * coSharePer) / 100; // Calculate co_premium @@ -3536,6 +3574,9 @@ var insurerCount = 0; $('#setInsurerCount').on('click', function() { addInsurerColumn(); // Ensure this function is defined properly + setTimeout(() => { + getColumnIndexes(); + }, 2000); }); @@ -3840,6 +3881,9 @@ function addInsurerColumn() { const index = $(this).closest('th').index(); let count_index = $(this).data('count'); removeInsurerColumn(index, count_index); + setTimeout(() => { + getColumnIndexes(); + }, 2000); }); // hidePermiumDetailsBasedOnTheTeam() diff --git a/app/Views/ticket_form_gmc.php b/app/Views/ticket_form_gmc.php index 099cf7ad..0c7a4a75 100644 --- a/app/Views/ticket_form_gmc.php +++ b/app/Views/ticket_form_gmc.php @@ -32,32 +32,32 @@
- + name="emp_code" required>
- + + name="emp_name" required>
- + - +
- - + $value) { @@ -70,54 +70,54 @@
- +
- +
- + + name="emp_mobile" required>
- + + name="emp_mail" required>
- + - +
- + - +
- +
- - +

Claim Details

@@ -140,8 +141,8 @@
- -
- -
- -
- -
- + + name="hospital_name" required>
- + + name="doa" required>
- + + value="" name="dod" required>
- + + name="claim_amount" required>
- + @@ -239,6 +240,7 @@
+

Additional Details

@@ -246,7 +248,7 @@