Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
7b71cbbb1d
@ -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
|
||||
|
||||
@ -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');
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -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');
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -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{
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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{
|
||||
|
||||
@ -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');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user