FIX_EXPORT_EXCEL_CHECK_CASH_DEPOSITE_AMT : RV
This commit is contained in:
parent
d7021c5210
commit
585d3bb9d9
@ -121,14 +121,11 @@ class EmpDataServiceController extends BaseController
|
||||
$totals += $value->total;
|
||||
}
|
||||
|
||||
// dd((Double) $totals, $insurer_id['insurer_id'], (Double) $cash_balance['balance']);
|
||||
if((int) $cash_balance['balance'] < (int) $totals){
|
||||
|
||||
// if((int) $totals < (int) $cash_balance['balance']){
|
||||
return 0;
|
||||
}
|
||||
|
||||
// dd($totals, $insurer_id['insurer_id'], $cash_balance['balance']);
|
||||
// }
|
||||
|
||||
// dd($totals);
|
||||
|
||||
// Log the count of exported data
|
||||
$count = count($objects);
|
||||
|
||||
@ -345,7 +345,15 @@ class EmployeeController extends AdminController
|
||||
if ($event_type == 'inception' || $event_type == 'addition' || $event_type == 'dependent_addition') {
|
||||
|
||||
$return = $empDataServiceController->generateExcelForAdditionandInception($batch_data);
|
||||
|
||||
if($return == 0){
|
||||
|
||||
session()->setFlashdata('error', "The insurer has an insufficient deposit amount.");
|
||||
return redirect()->to(base_url('employee/upload'));
|
||||
}
|
||||
|
||||
if (!$return) {
|
||||
|
||||
if ($insurer_or_tpa == 'tpa') {
|
||||
session()->setFlashdata('error', "No data was found for this action. The TPA ID has already been updated.");
|
||||
return redirect()->to(base_url('employee/upload'));
|
||||
@ -353,6 +361,7 @@ class EmployeeController extends AdminController
|
||||
session()->setFlashdata('error', "No data was found for this action. The UHID has already been updated.");
|
||||
return redirect()->to(base_url('employee/upload'));
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->myLogger->logme('error', 'Successfully exported Excel file in {data}.', ['data' => $event_type]);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user