FIX_FHPL_FETCH_TPA_MISS_MATCH_KEY
This commit is contained in:
parent
8ab0bca9ef
commit
9f522ff8cc
@ -530,12 +530,19 @@ class FhplApiController extends BaseController
|
|||||||
$employeePolicyModel = new EmployeePolicyModel();
|
$employeePolicyModel = new EmployeePolicyModel();
|
||||||
|
|
||||||
$employeePolicyData = $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')
|
->join('employees', 'employees.id = employee_polices.employee_id')
|
||||||
->where('employee_polices.client_policy_id', $client_policy_id)
|
->where('employee_polices.client_policy_id', $client_policy_id)
|
||||||
->where('employee_polices.tpa_id IS NULL')
|
->where('employee_polices.tpa_id IS NULL')
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
$updated = 0;
|
$updated = 0;
|
||||||
|
$employee_policy_ids = [];
|
||||||
|
$batch_file_success = 'success';
|
||||||
|
|
||||||
foreach ($employeePolicyData as $policy) {
|
foreach ($employeePolicyData as $policy) {
|
||||||
$hasMatchForThisPolicy = false;
|
$hasMatchForThisPolicy = false;
|
||||||
@ -566,17 +573,14 @@ class FhplApiController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Handle NO MATCH for this policy
|
|
||||||
if (!$hasMatchForThisPolicy) {
|
if (!$hasMatchForThisPolicy) {
|
||||||
|
|
||||||
$nhanceSideData = [
|
$nhanceSideData = [
|
||||||
'name' => $policy_data['name'] ?? null,
|
'name' => $policy['name'] ?? null,
|
||||||
'emp_code' => $policy_data['emp_code'] ?? null,
|
'emp_code' => $policy['emp_code'] ?? null,
|
||||||
'relationship' => $policy_data['relationship'] ?? null,
|
'relationship' => $policy['relationship'] ?? null,
|
||||||
'gender' => $policy_data['gender'] ?? null,
|
'gender' => $policy['gender'] ?? null,
|
||||||
'dob' => $policy_data['dob'] ?? null,
|
'dob' => $policy['dob'] ?? null,
|
||||||
];
|
];
|
||||||
$batch_file_success = 'partially success';
|
$batch_file_success = 'partially success';
|
||||||
|
|
||||||
@ -585,6 +589,7 @@ class FhplApiController extends BaseController
|
|||||||
"FHPL - TPA ID Pull No match for Nhance = " . json_encode($nhanceSideData)
|
"FHPL - TPA ID Pull No match for Nhance = " . json_encode($nhanceSideData)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// send e-card
|
// send e-card
|
||||||
if(!empty($employee_policy_ids)){
|
if(!empty($employee_policy_ids)){
|
||||||
|
|||||||
@ -976,7 +976,7 @@ $gst_total = 0;
|
|||||||
}, function(xhr, status, error) {
|
}, function(xhr, status, error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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) {
|
}, function(xhr, status, error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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{
|
}else{
|
||||||
|
|||||||
@ -6185,7 +6185,7 @@
|
|||||||
}, function(xhr, status, error) {
|
}, function(xhr, status, error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
});
|
});
|
||||||
@ -6251,7 +6251,7 @@
|
|||||||
}, function(xhr, status, error) {
|
}, function(xhr, status, error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
|
||||||
|
|||||||
@ -5842,7 +5842,7 @@
|
|||||||
}, function(xhr, status, error) {
|
}, function(xhr, status, error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
});
|
});
|
||||||
@ -5908,7 +5908,7 @@
|
|||||||
}, function(xhr, status, error) {
|
}, function(xhr, status, error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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').fadeOut();
|
||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
|
||||||
|
|||||||
@ -7433,7 +7433,7 @@ function appendMultiFileData(data) {
|
|||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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{
|
}else{
|
||||||
|
|||||||
@ -3271,7 +3271,7 @@
|
|||||||
}, function(xhr, status, error) {
|
}, function(xhr, status, error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error);
|
||||||
console.error(xhr.responseText);
|
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