@php function formatNumber($number) { // Check if the number has a decimal part if (floor($number) == $number) { // If it's a whole number, format without decimals return number_format($number, 0); } else { // If it has a decimal part, format with 2 decimal places return number_format($number, 2); } } @endphp

Daftar Tagihan

{{ $receivableList->city_code }}

Per Tgl. {{ \Carbon\Carbon::parse($receivableList->receivable_list_salesman_date)->format('d-m-Y') }}

@php $listGroupCode = array(); @endphp @foreach($receivableListDetail as $index => $detail) @if((array_search($detail->group_customer, $listGroupCode)) == NULL) @php array_push($listGroupCode,$detail->group_customer); $tes = $customers->where("customer_code",$detail->group_customer)->first(); @endphp @else @endif @endforeach
Nama Tgl Faktur No. Faktur Nilai Faktur Pembayaran Terutang
{{ $tes->customer_name }}
{{ $detail->customer_name }} {{ \Carbon\Carbon::parse($detail->document_date)->format('d/m/Y') }} {{ $detail->document_number }} RP. {{ formatNumber($detail->nominal, 0) }} RP. {{ formatNumber($detail->paid, 0) }} RP. {{ formatNumber($detail->nominal_left, 0) }}
{{ $detail->customer_name }} {{ \Carbon\Carbon::parse($detail->document_date)->format('d/m/Y') }} {{ $detail->document_number }} RP. {{ formatNumber($detail->nominal, 0) }} RP. {{ formatNumber($detail->paid, 0) }} RP. {{ formatNumber($detail->nominal_left, 0) }}
DISIAPKAN {{ date('d-m-Y') }} OLEH:
DIPERIKSA OLEH: