diff --git a/Http/Controllers/KonfirmasiBankController.php b/Http/Controllers/KonfirmasiBankController.php index c81328b..42d5f2a 100644 --- a/Http/Controllers/KonfirmasiBankController.php +++ b/Http/Controllers/KonfirmasiBankController.php @@ -122,6 +122,18 @@ class KonfirmasiBankController extends Controller public function postInfoSurat(Request $request) { + // $noSurat = $this->generateNomorSurat(); + // $request->validate([ + // 'signer' => ['required'], + // 'no_req_surat' => ['required', 'max:100'], + // 'tgl_req_surat' => ['required'], + // 'email' => ['email'], + // 'tlp' => ['numeric', 'max:10'], + // 'nama_tujuan' => ['required'], + // 'alamat' => ['required'] + // ]); + + //Validate the request //Validate the request $currentDate = Carbon::now(); $tglSurat = $currentDate->format('Y-m-d'); @@ -349,9 +361,8 @@ class KonfirmasiBankController extends Controller foreach ($listAccount as $key1 => $account) { + $dataAADepo = $Account->getAA($request['cusNo'], $account->ACCOUNT_NUMBER, $dateCore)->first(); if ($account->CATEGORY == '6603' || $account->CATEGORY == '6602') { - - $dataAADepo = $Account->getAA($request['cusNo'], $account->ACCOUNT_NUMBER, $dateCore)->first(); if ($dataAADepo != null) { $tenor = ''; @@ -465,6 +476,7 @@ class KonfirmasiBankController extends Controller //Get DatA Anjak $ListAnjak = $Account->getAccountAnjak($rekEscrow, $dateCore)->get(); $totalOutstanding = $ListAnjak->sum('OUTSTANDING') != null ? number_format(abs($ListAnjak->sum('OUTSTANDING')), 2, ',', '.') : 'NIHIL'; + // dd($totalOutstanding); // foreach ($ListAnjak as $key4 => $val4) { diff --git a/Resources/views/exportPdf.blade.php b/Resources/views/exportPdf.blade.php index f1f2f44..2ae8eb6 100644 --- a/Resources/views/exportPdf.blade.php +++ b/Resources/views/exportPdf.blade.php @@ -204,7 +204,7 @@
- @if (count($data['DataPinjaman'])>0 OR count($data['DataRK'])>0 OR $data['totalOutstanding'] != '' ) + @if (count($data['DataPinjaman'])>0 OR count($data['DataRK'])>0 OR $data['totalOutstanding'] != 'NIHIL' ) @if (count($data['DataPinjaman'])>0) @php $i=1; $saldo = ''; @@ -249,7 +249,7 @@ @endforeach @endif - @if ($data['totalOutstanding'] != '') + @if ($data['totalOutstanding'] != 'NIHIL') @php $no = 0; if (count( $data['DataPinjaman']) > 0) {