From 70eef3375ae8e75b38f6a835bf65701fc7a1d461 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 10 Jun 2025 10:39:20 +0530 Subject: [PATCH] FIX_MISSED_INCEP_SAMPLE_ENDO_CHECK THE CONDITION_TO_ENDO_CHANGE_HELPER_FOR ADDON_SI_HANDLE_BDS_FILEUPLOAD_HIDESHOW : RV --- app/Controllers/ClientController.php | 1 + app/Controllers/EmpDataServiceController.php | 3 ++- app/Controllers/EmployeeController.php | 7 +++--- app/Helpers/excel_util_helper.php | 2 +- .../policy_transaction_inception_form.php | 22 +++++++++---------- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 67299929..35acba3c 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -4863,6 +4863,7 @@ class ClientController extends AdminController $EmpDataServiceController = new EmpDataServiceController(); // $EmpDataServiceController->generateExcelForSIEnhancement($batch_data); die; + // $EmpDataServiceController->importInceptionFileValidation(['file_id' => 1932]); die; // $EmpDataServiceController->importDeletionValidation(['file_id' => 304]); //for live // $EmpDataServiceController->importSIEnhancementUpdateEndorsementID(['file_id' => 1199]); //for live // $EmpDataServiceController->importSIEnhancementValidation(['file_id' => 1205]); //for live diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index 84a2b01c..a7cadc9e 100755 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -1411,7 +1411,8 @@ class EmpDataServiceController extends BaseController // dd($inceptionHeader); foreach ($inceptionHeader as $key => $value) { - if($excel_header[$key] != $value){ + if (!isset($excel_header[$key]) || $excel_header[$key] != $value) { + $data = [ 'status' => 'failed-5', ]; diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 3520f90b..6541e011 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -345,7 +345,7 @@ class EmployeeController extends AdminController } // ->where('files.created_by', get_session_userid()) $data['fileList'] = $query->groupBy("c.id")->orderBy('files.created_at', 'desc') - ->limit(100) + ->limit(1500) ->find(); // dd($data['fileList']); @@ -396,7 +396,7 @@ class EmployeeController extends AdminController } // ->where('files.created_by', get_session_userid()) $data['batch_list'] = $query2->groupBy("clients.id")->orderBy('batch_files.id', 'desc') - ->limit(1000) + ->limit(1500) ->find(); @@ -1042,6 +1042,7 @@ class EmployeeController extends AdminController $data = $this->employeePolicyModel->select('employee_polices.id') ->where('employee_polices.is_active', 1) + ->where('employee_polices.status', 'active') ->where('employee_polices.client_policy_id', $id) ->findAll(); @@ -2403,7 +2404,7 @@ class EmployeeController extends AdminController } else if ($actionType == 'deletion') { $filePath = ROOTPATH . 'public/sample_import_excel/sample_import_Deletion.xlsx'; }else if ($actionType == 'missed_inception') { - $filePath = ROOTPATH . 'public/sample_import_excel/sample_import_Inception.xlsx'; + $filePath = ROOTPATH . 'public/sample_import_excel/sample_import_Addition.xlsx'; } // Check if the file exists diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php index 70aad242..141fe725 100755 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -1385,7 +1385,7 @@ if (!function_exists('premium_calculation_manager')) { } //this if condition for premium calculated & premium type 3 (familiy floater but premium calculated every individual implemented later) then remove si amount only for dependents (not self) - if ($is_match_found && strtolower($emp_data['relationship']) != 'self' && $temp_slab_rates[0]['premium_type'] == 3) { + if ($is_match_found && strtolower($emp_data['relationship']) != 'self' && $temp_slab_rates[0]['premium_type'] == 3 && $policy_terms['is_addon'] != 3) { //set dependent si to 0 $emp_data['policy_details']['basic_cover_si'] = 0; } diff --git a/app/Views/policy_transaction_inception_form.php b/app/Views/policy_transaction_inception_form.php index 93cc234d..cc6415c1 100644 --- a/app/Views/policy_transaction_inception_form.php +++ b/app/Views/policy_transaction_inception_form.php @@ -1675,11 +1675,12 @@ function getPolicyTransactionDataForEdit(input) { $('#is_cd_reduce_from_bds').prop('disabled',false) } - if(res.data.client_policy_id != 0 && res.data.client_policy_id != null){ - $('#hide_file_upload').show(); - }else{ - $('#hide_file_upload').hide(); - } + // if(res.data.client_policy_id != 0 && res.data.client_policy_id != null){ + // $('#hide_file_upload').show(); + // }else{ + // $('#hide_file_upload').hide(); + // } + $('#hide_file_upload').show(); if (res.data.master_policy_type_id) { $('#policy_type_id').val(res.data.master_policy_type_id).change(); @@ -3234,12 +3235,11 @@ $("#inception_form_id").submit(function(event) { $('#policy_tranction_primarykey_for_file_upload').val(res.pt_id); $('#client_policy_id_for_file_upload').val(res.data.client_policy_id); - if(res.data.client_policy_id != 0 && res.data.client_policy_id != null){ - $('#hide_file_upload').show(); - }else{ - $('#hide_file_upload').hide(); - } - + //if(res.data.client_policy_id != 0 && res.data.client_policy_id != null){ + // $('#hide_file_upload').show(); + //}else{ + // $('#hide_file_upload').hide(); + //} $('#client_id_for_vehicle_file_upload').val(res.data.client_id); $('#vehicle_id_for_file_upload').val(res.data.vehicle_id);