| Bil |
Nama |
No K/P |
No Rujukan |
Caj Lelong (RM) |
Jumlah Baki (RM) |
@php $counter = 1; $totaljumlah = 0; @endphp
@foreach($tuntutbaki as $index=>$item)
@php $totaljumlah += $item['jumlah'] @endphp
@if($index > 0)
@if($item['teller'] != $tuntutbaki[$index - 1]['teller'])
| Teller : {{ $item['teller'] }} |
@php $totalpinjamanteller = 0;$totalcajlelong = 0; @endphp
@endif
@else
| Teller : {{ $item['teller'] }} |
@php $totalpinjamanteller = 0;$totalcajlelong = 0; @endphp
@endif
| {{ $counter }} |
@php
$gadaidetail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json();
$customer_detail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/customers/' . $gadaidetail[0][0]['nokp'])->json();
echo $customer_detail['nama'];
@endphp
|
{{$gadaidetail[0][0]['nokp']}} |
{{$item['norujukan']}} |
{{ $item['cajlelong'] }} |
{{ $item['jumlah'] }} |
@php $counter++; @endphp
@php $totalpinjamanteller += $item['jumlah'];$totalcajlelong += $item['cajlelong']; @endphp
@if($index+1 < sizeof($tuntutbaki))
@if($item['teller'] != $tuntutbaki[$index + 1]['teller'])
| {{ $counter-1 }} Jumlah surat bagi teller : {{ $item['teller'] }} |
{{ number_format($totalcajlelong,2) }} |
{{ number_format($totalpinjamanteller,2) }} |
@php $counter = 1;$totalpinjamanteller = 0;$totalcajlelong = 0; @endphp
@endif
@else
| {{ $counter-1 }} Jumlah surat bagi teller : {{ $item['teller'] }} |
{{ number_format($totalcajlelong,2) }} |
{{ number_format($totalpinjamanteller,2) }} |
@endif
@endforeach