| {{now()->format('d/m/Y')}} |
Total amount invoice
| {{ number_format($total, 2) }} |
|
{{ number_format($total, 2) }} |
@php
$balance = $total;
@endphp
@forelse ($payments as $payment)
@php
$amount = floatval($payment->amount ?? 0);
if ($payment->status->label() == 'Paid') {
$balance -= $amount;
}
@endphp
| {{ $payment->invoiced_at?->format('d/m/Y') ?? '-' }} |
{{ $payment->invoice_no ?? '' }} |
@if($payment->status->label() == 'Pending'){{ $payment->exact_amount ?? '-' }}@endif |
@if($payment->status->label() == 'Paid'){{ $payment->exact_amount ?? '-' }}@endif |
|
@foreach ($payment->items->reject(fn($i)=>is_null($i->credit_debit_note_id)) as $item)
| |
{{ str_replace('Metro-INVN-', 'Metro-' . ($item->type->value ?? '') . '-', $payment->invoice_no ?? '') }} |
@if($payment->status->label() == 'Pending'){{ $item->amount ?? '-' }}@endif |
@if($payment->status->label() == 'Paid'){{ $item->amount ?? '-' }}@endif |
|
@endforeach
@empty
| No record found |
@endforelse
| {{now()->format('d/m/Y')}} |
Balance b/f
| {{ number_format($balance, 2) }} |
|
{{ number_format($balance, 2) }} |