Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev

This commit is contained in:
sanjeev.p 2026-05-04 15:34:40 +05:30
commit 7b71cbbb1d
8 changed files with 30 additions and 25 deletions

View File

@ -530,12 +530,19 @@ class FhplApiController extends BaseController
$employeePolicyModel = new EmployeePolicyModel();
$employeePolicyData = $employeePolicyModel
->select('
employees.*,
employee_polices.id as emp_policy_id,
employee_polices.client_policy_id,
')
->join('employees', 'employees.id = employee_polices.employee_id')
->where('employee_polices.client_policy_id', $client_policy_id)
->where('employee_polices.tpa_id IS NULL')
->findAll();
$updated = 0;
$employee_policy_ids = [];
$batch_file_success = 'success';
foreach ($employeePolicyData as $policy) {
$hasMatchForThisPolicy = false;
@ -566,24 +573,22 @@ class FhplApiController extends BaseController
}
}
}
}
// Handle NO MATCH for this policy
if (!$hasMatchForThisPolicy) {
if (!$hasMatchForThisPolicy) {
$nhanceSideData = [
'name' => $policy['name'] ?? null,
'emp_code' => $policy['emp_code'] ?? null,
'relationship' => $policy['relationship'] ?? null,
'gender' => $policy['gender'] ?? null,
'dob' => $policy['dob'] ?? null,
];
$batch_file_success = 'partially success';
$nhanceSideData = [
'name' => $policy_data['name'] ?? null,
'emp_code' => $policy_data['emp_code'] ?? null,
'relationship' => $policy_data['relationship'] ?? null,
'gender' => $policy_data['gender'] ?? null,
'dob' => $policy_data['dob'] ?? null,
];
$batch_file_success = 'partially success';
log_message(
'error',
"FHPL - TPA ID Pull No match for Nhance = " . json_encode($nhanceSideData)
);
log_message(
'error',
"FHPL - TPA ID Pull No match for Nhance = " . json_encode($nhanceSideData)
);
}
}
// send e-card

View File

@ -976,7 +976,7 @@ $gst_total = 0;
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while fetching e-card.', 'Error');
});

View File

@ -1361,7 +1361,7 @@
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while fetching TPA ID.', 'Error');
});

View File

@ -733,7 +733,7 @@ if (isset($selected_lead_type)) {
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while removing the file.', 'Error');
});
}else{

View File

@ -6185,7 +6185,7 @@
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while creating the vehicle.', 'Error');
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
@ -6251,7 +6251,7 @@
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while creating the client.', 'Error');
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');

View File

@ -5842,7 +5842,7 @@
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while creating the vehicle.', 'Error');
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
@ -5908,7 +5908,7 @@
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while createing the client.', 'Error');
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');

View File

@ -7433,7 +7433,7 @@ function appendMultiFileData(data) {
$('.loader-mask').delay(350).fadeOut('slow');
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while removing the file.', 'Error');
});
}else{

View File

@ -3271,7 +3271,7 @@
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while checking the CD amount.', 'Error');
toastr.error('An error occurred while saving the data.', 'Error');
});
}