diff --git a/app/Controllers/AppContentManagementController.php b/app/Controllers/AppContentManagementController.php
index a3db36ec..15a95f49 100755
--- a/app/Controllers/AppContentManagementController.php
+++ b/app/Controllers/AppContentManagementController.php
@@ -73,11 +73,11 @@ class AppContentManagementController extends AdminController
]
],
'client_id' => [
- 'rules' => 'required|integer|is_natural_no_zero',
+ 'rules' => 'required|integer|is_natural',
'errors' => [
- 'required' => 'Client is required',
- 'integer' => 'Invalid client selected',
- 'is_natural_no_zero' => 'Invalid client selected'
+ 'required' => 'Client is required',
+ 'integer' => 'Invalid client selected',
+ 'is_natural' => 'Invalid client selected',
]
],
'advertise_image' => [
@@ -85,15 +85,13 @@ class AppContentManagementController extends AdminController
. 'is_image[advertise_image]'
. '|mime_in[advertise_image,image/jpg,image/jpeg,image/png]'
. '|max_size[advertise_image,200]'
- . '|min_dims[advertise_image,1640,664]'
. '|max_dims[advertise_image,1640,664]',
'errors' => [
'uploaded' => 'Image is required',
'is_image' => 'File must be an image',
'mime_in' => 'Only JPG, JPEG, PNG allowed',
'max_size' => 'Image size must not exceed 200 KB',
- 'min_dims' => 'Image dimensions must be exactly 1640x664 pixels',
- 'max_dims' => 'Image dimensions must be exactly 1640x664 pixels',
+ 'max_dims' => 'Image dimensions must not exceed 1640x664 pixels',
]
],
];
@@ -110,9 +108,11 @@ class AppContentManagementController extends AdminController
$file = $this->request->getFile('advertise_image');
$client_id = (int)($sanitized_post_data['client_id'] ?? 0);
- $clientExists = $this->clientModel->where('id', $client_id)->where('is_active', 1)->first();
- if (!$clientExists) {
- return $this->respond(['status' => false, 'message' => 'Invalid client selected.'], 400);
+ if ($client_id !== 0) {
+ $clientExists = $this->clientModel->where('id', $client_id)->where('is_active', 1)->first();
+ if (!$clientExists) {
+ return $this->respond(['status' => false, 'message' => 'Invalid client selected.'], 400);
+ }
}
if (!$file || !$file->isValid()) {
@@ -123,6 +123,11 @@ class AppContentManagementController extends AdminController
return $this->respond(['status' => false, 'message' => 'Only JPG, JPEG, PNG files are allowed.'], 400);
}
+ $dimInfo = @getimagesize($file->getTempName());
+ if ($dimInfo === false || (int) $dimInfo[0] !== 1640 || (int) $dimInfo[1] !== 664) {
+ return $this->respond(['status' => false, 'message' => 'Image dimensions must be exactly 1640x664 pixels.'], 400);
+ }
+
$fileName = sanitize_upload_filename($file->getClientName());
$existing = $this->addImgModel->where('name', $fileName)->where('client_id', $client_id)->where('is_active', 1)->first();
if($existing){ return $this->respond(['status' => false, 'message' => 'This file has already been uploaded in active state.'], 400); }
diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php
index 8db53a2f..6019a866 100755
--- a/app/Controllers/EmployeeController.php
+++ b/app/Controllers/EmployeeController.php
@@ -497,6 +497,7 @@ class EmployeeController extends AdminController
batch_files.is_active,
batch_files.amount,
batch_files.status,
+ batch_files.icici_status_flag,
batch_files.client_branch_id,
insurers.short_name as insurer_short_name,
tpa.short_name as tpa_short_name,
diff --git a/app/Controllers/EmployeeMultiEventServiceController.php b/app/Controllers/EmployeeMultiEventServiceController.php
index b554a969..4f51f1ad 100644
--- a/app/Controllers/EmployeeMultiEventServiceController.php
+++ b/app/Controllers/EmployeeMultiEventServiceController.php
@@ -256,7 +256,9 @@ class EmployeeMultiEventServiceController extends BaseController
'is_mandatory' => ['A', 'DA', 'D'],
'data_type' => 'str',
'format' => null,
- 'allowed_values' => null
+ 'allowed_values' => null,
+ 'custom' => 'check_change_event',
+ 'params' => ['row', 'file']
],
'date_of_exit' => [
'col_idx' => 16,
@@ -2348,6 +2350,7 @@ class EmployeeMultiEventServiceController extends BaseController
// echo 'insert emp';
} else {
$value['emp_status'] = 'active';
+ $value['change_event'] = normalize_file_action($file['action']);
$value['created_by'] = $file['created_by'];
$value['client_branch_id'] = $file['client_branch_id'];
$value['family_floater_key'] = generate_family_floater_key($value['relationship']);
diff --git a/app/Controllers/EmployeeServiceController.php b/app/Controllers/EmployeeServiceController.php
index af2fdd96..064d1dc5 100755
--- a/app/Controllers/EmployeeServiceController.php
+++ b/app/Controllers/EmployeeServiceController.php
@@ -259,7 +259,10 @@ class EmployeeServiceController extends AdminController
'is_mandatory' => ['A', 'DA', 'D'],
'data_type' => 'str',
'format' => null,
- 'allowed_values' => null
+ 'allowed_values' => null,
+ 'custom' => 'check_change_event',
+ 'params' => ['row', 'file']
+
],
'date_of_exit' => [
'col_idx' => 16,
@@ -1957,6 +1960,7 @@ class EmployeeServiceController extends AdminController
else
{
$value['emp_status'] = 'active';
+ $value['change_event'] = normalize_file_action($file['action']);
$value['created_by'] = $file['created_by'];
$value['client_branch_id'] = $file['client_branch_id'];
$value['family_floater_key'] = generate_family_floater_key($value['relationship']);
diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php
index d7f3129a..5691c819 100644
--- a/app/Controllers/TicketController.php
+++ b/app/Controllers/TicketController.php
@@ -4149,12 +4149,18 @@ class TicketController extends BaseController
$status = 'inprogress';
+ $claim_dump_date = null;
+ $claim_dump_date_input = trim((string) ($this->request->getPost('claim_dump_date') ?? ''));
+ if (!empty($claim_dump_date_input)) {
+ $claim_dump_date = change_date_format($claim_dump_date_input, 'd/m/Y', 'Y-m-d');
+ }
$insert_data = [
'file_name' => $filename,
'status' => $status,
'client_id' => !empty($this->request->getPost('client_id')) ? $this->request->getPost('client_id') : null,
'client_policy_id' => !empty($this->request->getPost('client_policy_id')) ? $this->request->getPost('client_policy_id') : null,
'tpa_id' => !empty($this->request->getPost('tpa_id')) ? $this->request->getPost('tpa_id') : null,
+ 'claim_dump_date' => $claim_dump_date,
];
$file_id = $this->claimDumpFileModel->insert($insert_data);
diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php
index 0c99c9ef..0b7d0039 100755
--- a/app/Helpers/excel_util_helper.php
+++ b/app/Helpers/excel_util_helper.php
@@ -2582,6 +2582,72 @@ if (!function_exists('normalizeGender')) {
}
}
+if (!function_exists('check_change_event')) {
+ function check_change_event($row, $file)
+ {
+ $change_event = isset($row[15]) ? $row[15] : '';
+ $action = isset($file['action']) ? $file['action'] : '';
+ $allowed_values = [
+ 'inception' => ['inception'],
+ 'addition' => ['addition'],
+ 'dependent_addition' => ['dependent addition', 'd-addition'],
+ 'missed_inception' => ['missed inception'],
+ ];
+
+ $normalize = function ($value) {
+ return strtolower(trim((string) $value)); // ✅ Added `return`
+ };
+
+ $change_event = $normalize($change_event);
+
+ // Allow inception with no change_event
+ if ($action === 'inception' && empty($change_event)) {
+ return ['status' => true];
+ }
+
+ // Validate change_event against allowed values for the given action
+ if (isset($allowed_values[$action]) && in_array($change_event, $allowed_values[$action])) {
+ return ['status' => true];
+ }
+
+ // Build error message
+ $expected_values = $allowed_values[$action] ?? [];
+ $expected_message = "'" . implode("' or '", array_map('strtoupper', $expected_values)) . "'";
+ if ($action === 'inception') {
+ $expected_message .= " or blank";
+ }
+
+ return [
+ 'status' => false,
+ 'error' => "Rule Conflict: Invalid Change Event for this action\n\n'{$action}'. Expected {$expected_message}", ];
+ }
+}
+
+if (!function_exists('normalize_file_action')) {
+ function normalize_file_action($file_action)
+ {
+ if($file_action == 'inception'){
+ return 'Inception';
+ }else if($file_action == 'addition'){
+ return 'Addition';
+ }else if($file_action == 'dependent_addition'){
+ return 'Dependent Addition';
+ }else if($file_action == 'deletion'){
+ return 'Deletion';
+ }else if($file_action == 'correction'){
+ return 'Correction';
+ }else if($file_action == 'si_enhancement'){
+ return 'SI Enhancement';
+ }else if($file_action == 'enrollment'){
+ return 'Enrollment';
+ }else if($file_action == 'missed_inception'){
+ return 'Missed Inception';
+ }
+ return '';
+ }
+}
+
+
// ------------- FUNCTION FOR LEAD MEMBER DATA LIST VALIDATIONS --------------------------------------
if (!function_exists('check_columns_name_exist')) {
diff --git a/app/Helpers/utility_helper.php b/app/Helpers/utility_helper.php
index 9498fb88..a79b8b49 100755
--- a/app/Helpers/utility_helper.php
+++ b/app/Helpers/utility_helper.php
@@ -108,6 +108,8 @@ if (! function_exists('file_Upload_for_lead')) {
}
$fileName = sanitize_upload_filename($fileToUpload->getName());
$fileToUpload->move($filepath, $fileName);
+ $fileName = $fileToUpload->getName();
+
return $fileName;
} else {
return "";
diff --git a/app/Libraries/TPAClaimsImportServices/AbhiClaimImportService.php b/app/Libraries/TPAClaimsImportServices/AbhiClaimImportService.php
index 4f6ff966..81a01aec 100644
--- a/app/Libraries/TPAClaimsImportServices/AbhiClaimImportService.php
+++ b/app/Libraries/TPAClaimsImportServices/AbhiClaimImportService.php
@@ -361,6 +361,7 @@ class AbhiClaimImportService extends BaseTpaClaimImportService
$item['claim_status_id'] = $this->checkStatusMapping($this->statusMapping, $row['claim_status']);
$item['file_id'] = $file_id;
$item['claim_dump_ref_id'] = $row['id'];
+ $item['claim_dump_date'] = $file_data['claim_dump_date'] ?? null;
$item['created_by'] = $file_data['created_by'] ?? null;
$item['claim_type'] = isset($row['mainclaim_prepost_type']) && !empty($row['mainclaim_prepost_type']) && strtolower($row['mainclaim_prepost_type']) == 'normal' ? 1 : 3;
$item['priority'] = 1;
diff --git a/app/Libraries/TPAClaimsImportServices/FhplClaimImportService.php b/app/Libraries/TPAClaimsImportServices/FhplClaimImportService.php
index f2de776f..653043ef 100644
--- a/app/Libraries/TPAClaimsImportServices/FhplClaimImportService.php
+++ b/app/Libraries/TPAClaimsImportServices/FhplClaimImportService.php
@@ -427,6 +427,7 @@ class FhplClaimImportService extends BaseTpaClaimImportService
$item['claim_status_id'] = $this->checkStatusMapping($this->statusMapping, $row['current_claim_status']) ?? 61;
$item['file_id'] = $file_id;
$item['claim_dump_ref_id'] = $row['id'];
+ $item['claim_dump_date'] = $file_data['claim_dump_date'] ?? null;
$item['created_by'] = $file_data['created_by'] ?? null;
$item['claim_type'] = 1;
$item['priority'] = 1;
diff --git a/app/Libraries/TPAClaimsImportServices/IciciClaimImportService.php b/app/Libraries/TPAClaimsImportServices/IciciClaimImportService.php
index 736d9f5a..15da3177 100644
--- a/app/Libraries/TPAClaimsImportServices/IciciClaimImportService.php
+++ b/app/Libraries/TPAClaimsImportServices/IciciClaimImportService.php
@@ -342,6 +342,7 @@ class IciciClaimImportService extends BaseTpaClaimImportService
$item['claim_status_id'] = $this->checkStatusMapping($this->statusMapping, $row['updated_status']) ?? 61;
$item['claim_dump_ref_id'] = $row['id'];
$item['file_id'] = $file_id;
+ $item['claim_dump_date'] = $file_data['claim_dump_date'] ?? null;
$item['created_by'] = $file_data['created_by'] ?? null;
$item['claim_type'] = 1;
$item['priority'] = 1;
diff --git a/app/Libraries/TPAClaimsImportServices/MediAssistClaimImportService.php b/app/Libraries/TPAClaimsImportServices/MediAssistClaimImportService.php
index a853ade6..a6ea7d0c 100644
--- a/app/Libraries/TPAClaimsImportServices/MediAssistClaimImportService.php
+++ b/app/Libraries/TPAClaimsImportServices/MediAssistClaimImportService.php
@@ -375,6 +375,7 @@ class MediAssistClaimImportService extends BaseTpaClaimImportService
$item['claim_dump_ref_id'] = $row['id'];
$item['file_id'] = $file_id;
$item['claim_status_id'] = $this->checkStatusMapping($this->statusMapping, $row['claim_status']) ?? 61;
+ $item['claim_dump_date'] = $file_data['claim_dump_date'] ?? null;
$item['created_by'] = $file_data['created_by'] ?? null;
$item['claim_type'] = 1;
$item['priority'] = 1;
diff --git a/app/Libraries/TPAClaimsImportServices/RcareClaimImportService.php b/app/Libraries/TPAClaimsImportServices/RcareClaimImportService.php
index dc9cf54a..0b93f149 100644
--- a/app/Libraries/TPAClaimsImportServices/RcareClaimImportService.php
+++ b/app/Libraries/TPAClaimsImportServices/RcareClaimImportService.php
@@ -328,6 +328,7 @@ class RcareClaimImportService extends BaseTpaClaimImportService
$item['file_id'] = $file_id;
$item['created_by'] = $file_data['created_by'] ?? null;
$item['claim_dump_ref_id'] = $row['id'];
+ $item['claim_dump_date'] = $file_data['claim_dump_date'] ?? null;
$item['claim_type'] = 1;
$item['priority'] = 1;
$item['mode_of_intimation'] = 5;
diff --git a/app/Libraries/TPAClaimsImportServices/VidalClaimImportService.php b/app/Libraries/TPAClaimsImportServices/VidalClaimImportService.php
index b263109c..a0876b92 100644
--- a/app/Libraries/TPAClaimsImportServices/VidalClaimImportService.php
+++ b/app/Libraries/TPAClaimsImportServices/VidalClaimImportService.php
@@ -568,6 +568,7 @@ class VidalClaimImportService extends BaseTpaClaimImportService
$item['claim_status_id'] = $this->checkStatusMapping($this->statusMapping, $row['claim_status']) ?? 61;
$item['file_id'] = $file_id;
$item['claim_dump_ref_id'] = $row['id'];
+ $item['claim_dump_date'] = $file_data['claim_dump_date'] ?? null;
$item['created_by'] = $file_data['created_by'] ?? null;
$item['claim_type'] = isset($row['mainclaim_prepost_type']) && !empty($row['mainclaim_prepost_type']) && strtolower($row['mainclaim_prepost_type']) == 'normal' ? 1 : 3;
$item['priority'] = 1;
@@ -599,6 +600,8 @@ class VidalClaimImportService extends BaseTpaClaimImportService
public function mapClaimMasterDataOld($file_id): array
{
+ $claimDumpFileModel = new ClaimDumpFileModel();
+ $file_data = $claimDumpFileModel->where('id', $file_id)->first();
$tpaClaimDumpData = $this->db
->table('claims_dump_vidal')
@@ -686,6 +689,7 @@ class VidalClaimImportService extends BaseTpaClaimImportService
// Meta fields
$item['file_id'] = $file_id;
+ $item['claim_dump_date'] = $file_data['claim_dump_date'] ?? null;
$item['created_by'] = get_session_userid() ?? null;
$item['claim_type'] = isset($row['mainclaim_prepost_type']) && !empty($row['mainclaim_prepost_type']) && strtolower($row['mainclaim_prepost_type']) == 'normal' ? 1 : 3;
$item['claim_created_by'] = 'DUMP_TPA';
diff --git a/app/Models/ClaimDumpFileModel.php b/app/Models/ClaimDumpFileModel.php
index e34d6116..c6466479 100644
--- a/app/Models/ClaimDumpFileModel.php
+++ b/app/Models/ClaimDumpFileModel.php
@@ -13,6 +13,7 @@ class ClaimDumpFileModel extends Model
"client_id",
"client_policy_id",
"tpa_id",
+ "claim_dump_date",
"file_name",
"status",
"reason",
diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php
index a610e38a..e63140ef 100755
--- a/app/Views/batch_list.php
+++ b/app/Views/batch_list.php
@@ -61,6 +61,11 @@ for ($i = 0; $i < $batch_col_count; $i++) {
cursor: pointer;
}
+/* Allow line breaks in tooltip titles using \n */
+.tooltip-inner {
+ white-space: pre-line;
+}
+
/* Column widths from max data length (see PHP above).
Avoid table-layout:fixed + identical max-width on TH — it fights DataTables col sizing and skews TH vs TD.
Do not max-width THEAD cells (sort icons use position:absolute; narrow max clips them). */
@@ -289,15 +294,32 @@ for ($i = 0; $i < $batch_col_count; $i++) {
|
-
-
-
-
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
|
- |
|
|
diff --git a/app/Views/claim_dump_file_list.php b/app/Views/claim_dump_file_list.php
index ab3ca668..ee00683e 100644
--- a/app/Views/claim_dump_file_list.php
+++ b/app/Views/claim_dump_file_list.php
@@ -267,6 +267,10 @@
+
+
+
+