@foreach($invoices as $i => $inv)
@php $remaining = max(0, (float) $inv->total - (float) $inv->paid_amount); @endphp
| {{ $inv->number }} |
{{ $inv->invoice_date?->format('Y-m-d') }} |
{{ $inv->due_date?->format('Y-m-d') ?? '—' }} |
{{ number_format((float) $inv->total, 2) }} |
{{ number_format($remaining, 2) }} |
|
@endforeach