fixing error anjak piutang
This commit is contained in:
@ -122,6 +122,18 @@ class KonfirmasiBankController extends Controller
|
|||||||
|
|
||||||
public function postInfoSurat(Request $request)
|
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
|
//Validate the request
|
||||||
$currentDate = Carbon::now();
|
$currentDate = Carbon::now();
|
||||||
$tglSurat = $currentDate->format('Y-m-d');
|
$tglSurat = $currentDate->format('Y-m-d');
|
||||||
@ -349,9 +361,8 @@ class KonfirmasiBankController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
foreach ($listAccount as $key1 => $account) {
|
foreach ($listAccount as $key1 => $account) {
|
||||||
|
$dataAADepo = $Account->getAA($request['cusNo'], $account->ACCOUNT_NUMBER, $dateCore)->first();
|
||||||
if ($account->CATEGORY == '6603' || $account->CATEGORY == '6602') {
|
if ($account->CATEGORY == '6603' || $account->CATEGORY == '6602') {
|
||||||
|
|
||||||
$dataAADepo = $Account->getAA($request['cusNo'], $account->ACCOUNT_NUMBER, $dateCore)->first();
|
|
||||||
if ($dataAADepo != null) {
|
if ($dataAADepo != null) {
|
||||||
|
|
||||||
$tenor = '';
|
$tenor = '';
|
||||||
@ -465,6 +476,7 @@ class KonfirmasiBankController extends Controller
|
|||||||
//Get DatA Anjak
|
//Get DatA Anjak
|
||||||
$ListAnjak = $Account->getAccountAnjak($rekEscrow, $dateCore)->get();
|
$ListAnjak = $Account->getAccountAnjak($rekEscrow, $dateCore)->get();
|
||||||
$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';
|
||||||
|
|
||||||
// dd($totalOutstanding);
|
// dd($totalOutstanding);
|
||||||
|
|
||||||
// foreach ($ListAnjak as $key4 => $val4) {
|
// foreach ($ListAnjak as $key4 => $val4) {
|
||||||
|
@ -204,7 +204,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody style="page-break-inside: avoid;">
|
<tbody style="page-break-inside: avoid;">
|
||||||
@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)
|
@if (count($data['DataPinjaman'])>0)
|
||||||
@php $i=1;
|
@php $i=1;
|
||||||
$saldo = '';
|
$saldo = '';
|
||||||
@ -249,7 +249,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($data['totalOutstanding'] != '')
|
@if ($data['totalOutstanding'] != 'NIHIL')
|
||||||
@php
|
@php
|
||||||
$no = 0;
|
$no = 0;
|
||||||
if (count( $data['DataPinjaman']) > 0) {
|
if (count( $data['DataPinjaman']) > 0) {
|
||||||
|
Reference in New Issue
Block a user