@if($shopLogo ?? false) {{ $shopName }} @endif

{{ $shopName }}

@if($shopAddress)

{{ $shopAddress }}

@endif

LAPORAN PIUTANG

@if(isset($month)) Periode: {{ \Carbon\Carbon::createFromFormat('Y-m', $month)->translatedFormat('F Y') }} @else Semua Piutang (s/d {{ now()->format('d M Y') }}) @endif
Total Order Belum Lunas
{{ $summary['total_orders'] }}
Total Piutang
Rp {{ number_format($summary['total_receivables'], 0, ',', '.') }}
@forelse($orders as $index => $order) @php $age = (int) floor($order->created_at->diffInDays(now())); $ageClass = $age > 30 ? 'age-danger' : ($age > 7 ? 'age-warning' : 'age-normal'); $totalPaid = $order->getTotalPaid(); $remaining = $order->getRemainingBalance(); @endphp @empty @endforelse @if($orders->count() > 0) @endif
No Tanggal Invoice Pelanggan Total Dibayar Sisa Umur
{{ $index + 1 }} {{ $order->created_at->format('d/m/Y') }} {{ $order->invoice_number }}@if($order->isPartiallyPaid()) (Cicilan)@endif {{ $order->customer_name }} Rp {{ number_format($order->total_price, 0, ',', '.') }} {{ $totalPaid > 0 ? 'Rp ' . number_format($totalPaid, 0, ',', '.') : '-' }} Rp {{ number_format($remaining, 0, ',', '.') }} {{ $age }} hari
Tidak ada piutang
TOTAL PIUTANG Rp {{ number_format($summary['total_receivables'], 0, ',', '.') }}