diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 1fe2264f..66b74e0f 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -6703,16 +6703,16 @@ class ClientController extends AdminController // 'file_name' => "deletion_enhancement_test_file.xlsx", // ]; - // $batch_data = [ - // 'client_id' => 12, - // 'client_policy_id' => 8063, - // 'client_branch_id' => 1, - // 'insurer_or_tpa' => "insurer", - // // 'insurer_or_tpa' => "tpa", - // 'event_type' => "inception", - // 'file_name' => "si_enhancement_test_file.xlsx", - // 'actions' => "export", - // ]; + $batch_data = [ + 'client_id' => 12, + 'client_policy_id' => 8063, + 'client_branch_id' => 1, + 'insurer_or_tpa' => "insurer", + // 'insurer_or_tpa' => "tpa", + 'event_type' => "inception", + 'file_name' => "si_enhancement_test_file.xlsx", + 'actions' => "export", + ]; // $batch_data['insurer_or_tpa'] = 'insurer'; // $batch_data['insurer_or_tpa'] = 'tpa'; @@ -6773,13 +6773,15 @@ class ClientController extends AdminController // $totals = $totals + $item->total; // } + // clear_cd_balance_session(); + // $data = [ - // session()->get('cd_balance'), - // session()->get('cd_amount'), - // session()->get('hr_data'), - // session()->has('cd_balance'), + // 'cd_balance' => session()->get('cd_balance'), + // 'hr_data' => session()->get('hr_data'), + // 'cd_balance_info' => session()->get('cd_balance_info'), // get_cd_balance() // ]; + // dd($data); // $result = $this->employeePolicyModel->getCorrectionEmployeesDataForExportExcel($batch_data); // dd(db_connect()->getLastQuery()); diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index 70709383..8d75b095 100755 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -204,13 +204,14 @@ class EmpDataServiceController extends BaseController $totals = $totals + $item->total; } - $totals = round($totals, 2); + $totals = round($totals); //check CD amt insufficient only insurer, not tpa // DO NOT REMOVE THIS if($export_data['insurer_or_tpa'] == 'insurer') { if (!empty($cash_balance)) { - if ((int) $cash_balance['balance'] < (int) $totals) { + clear_cd_balance_session(); + if ((int) $cash_balance['balance'] == (int) $totals) { $this->myLogger->logme('error', 'Inception export failed due to insufficient deposit amount.'); $this->myLogger->logme('error', 'Inception export failed due to insufficient deposit amount. CASH BALANCE : {balance} and TOTAL AMOUNT : {total}', ['balance' => $cash_balance['balance'], 'total' => $totals]); @@ -224,8 +225,7 @@ class EmpDataServiceController extends BaseController }else{ session()->set('cd_balance', true); - session()->set('cd_amount', $cash_balance['balance']); - session()->set('excel_file_amt', $totals); + } } } diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 5b566530..71749ad4 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -4532,7 +4532,7 @@ class EmployeeController extends AdminController 'details' => $result ]; - } catch (Exception $e) { + } catch (\Exception $e) { // 5. Catch network or system exceptions $this->myLogger->logme('error', 'VISIT_OFFBOARD API Exception: ' . $e->getMessage()); return [ diff --git a/app/Helpers/utility_helper.php b/app/Helpers/utility_helper.php index 12e54b6f..efec7f1d 100755 --- a/app/Helpers/utility_helper.php +++ b/app/Helpers/utility_helper.php @@ -1119,11 +1119,11 @@ if (!function_exists('clear_cd_balance_session')) { { $session = session(); - $session->remove([ - 'cd_balance', - 'hr_data', - 'cd_balance_info' - ]); + $session->remove('cd_balance'); + $session->remove('hr_data'); + $session->remove('cd_balance_info'); + + log_message('error', 'clear_cd_balance_session clered'); } } diff --git a/app/Views/insurer_or_tpa_data.php b/app/Views/insurer_or_tpa_data.php index 2380d342..9635fb4b 100755 --- a/app/Views/insurer_or_tpa_data.php +++ b/app/Views/insurer_or_tpa_data.php @@ -7,7 +7,7 @@
@@ -1393,7 +1234,7 @@ messageShown = false; // Reset message flag submitInterval = setInterval(function() { checkCDBalance(); - }, 5000); + }, 10000); console.log("Checking CD balance started..."); } }