FIX_INCEPTION_TYPE_CHANGE_1_SWITCH_OFF_2_SWITCH_ON : RV
This commit is contained in:
parent
0c6be0aaeb
commit
8d3ba5376c
@ -27,6 +27,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
use PhpOffice\PhpSpreadsheet\Reader\Exception as SpreadsheetReaderException;
|
||||
use PhpParser\Node\Expr\Cast\Double;
|
||||
|
||||
use function PHPUnit\Framework\returnSelf;
|
||||
|
||||
@ -108,16 +109,27 @@ class EmpDataServiceController extends BaseController
|
||||
{
|
||||
// Fetch employee data for export from the database
|
||||
$objects = $this->employeePolicyModel->getInceptionEmployeeDataForExportExcel($export_data);
|
||||
|
||||
$insurer_id = $this->clientPolicyModel->where('id', $export_data['client_policy_id'])->first();
|
||||
|
||||
// dd($objects);
|
||||
|
||||
$cash_balance = $this->clientDepositModel->where('client_id',$export_data['client_id'] )->where('insurer_id', $insurer_id['insurer_id'])->orderBy('id', 'DESC')->first();
|
||||
|
||||
|
||||
$totals = 0;
|
||||
foreach ($objects as $key => $value) {
|
||||
|
||||
$totals += $value->total;
|
||||
}
|
||||
|
||||
|
||||
// dd((Double) $totals, $insurer_id['insurer_id'], (Double) $cash_balance['balance']);
|
||||
|
||||
if((int) $totals < (int) $cash_balance['balance']){
|
||||
|
||||
dd($totals, $insurer_id['insurer_id'], $cash_balance['balance']);
|
||||
}
|
||||
|
||||
dd($totals);
|
||||
|
||||
// Log the count of exported data
|
||||
$count = count($objects);
|
||||
$export_data['count'] = $count;
|
||||
|
||||
@ -634,7 +634,7 @@
|
||||
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
|
||||
$('#policy_status_field').show();
|
||||
|
||||
if (res.data.inception_type == 1) {
|
||||
if (res.data.inception_type == 2) {
|
||||
$('#inception_type').prop('checked', true);
|
||||
} else {
|
||||
$('#inception_type').prop('checked', false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user