Fix data fasilitas 4

This commit is contained in:
KhatamNugraha
2024-07-03 12:50:57 +07:00
parent 93b7894ae6
commit f93396b545

View File

@ -461,11 +461,11 @@ class KonfirmasiBankController extends Controller
$DataDepo[$keyDep]['TERM'] = substr($depo->KODE_SUB_PRODUK, 0, -1); $DataDepo[$keyDep]['TERM'] = substr($depo->KODE_SUB_PRODUK, 0, -1);
} }
} }
} catch (Exception $e) { } catch (\Throwable $th) {
return redirect()->route('konfirmasibank.timeout'); return redirect()->route('konfirmasibank.timeout');
} }
try {
$Arrangement = $Account->getPinjaman($request['cusNo'], $dateCoreAccount)->get(); $Arrangement = $Account->getPinjaman($request['cusNo'], $dateCoreAccount)->get();
if ($Arrangement->isNotEmpty()) { if ($Arrangement->isNotEmpty()) {
foreach ($Arrangement as $key2 => $pinjaman) { foreach ($Arrangement as $key2 => $pinjaman) {
@ -484,12 +484,7 @@ class KonfirmasiBankController extends Controller
} }
} }
} catch (\Illuminate\Database\QueryException $e) {
return redirect()->route('konfirmasibank.timeout');
}
try {
$listAccountRK = $Account->getAccountRK($arrAccount, $dateCoreAccount)->get(); $listAccountRK = $Account->getAccountRK($arrAccount, $dateCoreAccount)->get();
if ($listAccountRK->isNotEmpty()) { if ($listAccountRK->isNotEmpty()) {
foreach ($listAccountRK as $rk => $valRk) { foreach ($listAccountRK as $rk => $valRk) {
@ -508,12 +503,6 @@ class KonfirmasiBankController extends Controller
} }
} }
} catch (\Illuminate\Database\QueryException $e) {
return redirect()->route('konfirmasibank.timeout');
}
try {
$fasilitas = Fasilitas::where('nomor_cif', $request['cusNo'])->where('status', 1)->get(); $fasilitas = Fasilitas::where('nomor_cif', $request['cusNo'])->where('status', 1)->get();
if (!empty($fasilitas)) { if (!empty($fasilitas)) {
foreach ($fasilitas as $key3 => $val3) { foreach ($fasilitas as $key3 => $val3) {
@ -528,17 +517,8 @@ class KonfirmasiBankController extends Controller
} }
} }
} catch (\Illuminate\Database\QueryException $e) {
return redirect()->route('konfirmasibank.timeout');
}
//Get DatA Anjak //Get DatA Anjak
try {
$ListAnjak = $Account->getAccountAnjak($rekEscrow, $dateCoreAccount)->get(); $ListAnjak = $Account->getAccountAnjak($rekEscrow, $dateCoreAccount)->get();
// dd($ListAnjak);
} catch (\Illuminate\Database\QueryException $e) {
return redirect()->route('konfirmasibank.timeout');
}
$totalOutstanding = $ListAnjak->sum('OUTSTANDING') != null ? number_format(abs($ListAnjak->sum('OUTSTANDING')), 2, ',', '.') : 'NIHIL'; $totalOutstanding = $ListAnjak->sum('OUTSTANDING') != null ? number_format(abs($ListAnjak->sum('OUTSTANDING')), 2, ',', '.') : 'NIHIL';
$ListLimits = $Account->getLimit($request['cusNo'], $request['startDate2'])->get(); $ListLimits = $Account->getLimit($request['cusNo'], $request['startDate2'])->get();