From c2c4c18faf1cf48d51d55872486724357a6af07f Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Wed, 13 May 2026 12:35:08 +0530 Subject: [PATCH 1/2] FIX_CLAIM_HISTORY_TOGGLE_NOT_SHOWING_FOR_EDLI_AND_GTLI --- app/Controllers/FhplApiController.php | 13 ++++++++++--- app/Views/leads_form.php | 2 +- app/Views/rfq/gpa.php | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/Controllers/FhplApiController.php b/app/Controllers/FhplApiController.php index 2d6cc36c..866f19f6 100644 --- a/app/Controllers/FhplApiController.php +++ b/app/Controllers/FhplApiController.php @@ -503,12 +503,19 @@ class FhplApiController extends BaseController log_message('error', "Failed to update file table status."); } - log_message('error', 'FHPL - TPA ID Pull API FAILED | API failed: Empty menber data for this pull request'); + log_message('error', 'FHPL - TPA ID Pull API FAILED | API failed: Empty member data for this pull request'); + + $file_model = new BatchFileModel(); + $bfData = [ + 'error_data' => json_encode(['error_data' => 'API failed: Empty member data for this pull request.']), + 'status' => 'failed-7', + ]; + $file_model->where('id', $requestData['file_id'])->set($bfData)->update(); if($function_calling_type == "job"){ - return ['status' => false, 'message' => 'API call failed', 'data' => 'Empty menber data for this pull request']; + return ['status' => false, 'message' => 'API call failed', 'data' => 'Empty member data for this pull request']; }else{ - return $this->respond(['status' => false, 'message' => 'API call failed', 'data' => 'Empty menber data for this pull request']); + return $this->respond(['status' => false, 'message' => 'API call failed', 'data' => 'Empty member data for this pull request']); } } diff --git a/app/Views/leads_form.php b/app/Views/leads_form.php index 62b702f8..278fec55 100644 --- a/app/Views/leads_form.php +++ b/app/Views/leads_form.php @@ -2197,7 +2197,7 @@ console.log('policy_type_id', policy_type_id); let lead_type = $('#lead_type').val(); - let showClaimHistorySwitch = lead_type == 2 && policy_type_id == 1; + let showClaimHistorySwitch = lead_type == 2 && (policy_type_id == 1 || policy_type_id == 6 || policy_type_id == 7); console.log('claimIndex from parent', claimIndex); let increment = claimIndex; diff --git a/app/Views/rfq/gpa.php b/app/Views/rfq/gpa.php index bc5cb726..8d29fd05 100644 --- a/app/Views/rfq/gpa.php +++ b/app/Views/rfq/gpa.php @@ -46,7 +46,7 @@ $isClaimHistoryChecked = (isset($lead_edit_data['claim_history']) && (int) $lead_edit_data['claim_history'] === 1) || !empty($savedClaims); $showClaimHistorySwitch = isset($lead_edit_data['lead_type'], $lead_edit_data['policy_type_id']) && (int) $lead_edit_data['lead_type'] === 2 - && (int) $lead_edit_data['policy_type_id'] === 1; + && in_array((int) $lead_edit_data['policy_type_id'], [1, 6, 7], true); ?>
From 20329dfa20a9d4a68692dab7a62db8971b270821 Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Wed, 13 May 2026 13:00:24 +0530 Subject: [PATCH 2/2] FIX_DOWNLOAD_ISSUE --- .../PolicyTransactionController.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index 0f15f31d..b0a7cb12 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -5065,6 +5065,27 @@ class PolicyTransactionController extends BaseController } } + public function downloadInsurerStatement($id) + { + $statement = $this->insurerStatements + ->where('id', (int) $id) + ->where('is_active', 1) + ->first(); + + if (empty($statement) || empty($statement['file_name'])) { + throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound('Statement file not found'); + } + + $fileName = basename($statement['file_name']); + $filePath = WRITEPATH . 'uploads/statements/' . $fileName; + + if (!is_file($filePath)) { + throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound('Statement file not found'); + } + + return $this->response->download($filePath, null)->setFileName($fileName); + } + public function getFileErr() { $file_id = $this->request->getUri()->getSegment(4);