@php
$badgeClass = match($invoice->status) {
'paid' => 'success',
'unpaid', 'pending' => 'warning',
'partially_paid' => 'info',
'cancelled' => 'danger',
'refunded' => 'default',
'overdue' => 'dark',
default => 'secondary',
};
@endphp
| Invoice Number | {{ $invoice->invoice_number }} |
| Client | @if($invoice->user){{ $invoice->user->first_name }} {{ $invoice->user->last_name }}@else N/A @endif |
| Status | {{ ucfirst($invoice->status) }} |
| Type | {{ ucfirst($invoice->type ?? 'N/A') }} |
| Currency | {{ $invoice->currency_code }} |
| Subtotal | {{ number_format($invoice->subtotal, 2) }} |
| Discount | {{ number_format($invoice->discount_amount, 2) }} |
| Tax | {{ number_format($invoice->tax_amount, 2) }} |
| Transaction Fee | {{ number_format($invoice->transaction_fee, 2) }} |
| Total | {{ number_format($invoice->total, 2) }} |
| Amount Paid | {{ number_format($invoice->amount_paid, 2) }} |
| Balance Due | {{ number_format($invoice->balance_due, 2) }} |
| Due Date | {{ $invoice->due_date?->format('M d, Y') ?? 'N/A' }} |
| Paid At | {{ $invoice->paid_at?->format('M d, Y H:i') ?? 'N/A' }} |
@if($invoice->notes)
Notes
{{ $invoice->notes }}
@endif
@if(in_array($invoice->status, ['paid', 'unpaid', 'pending', 'overdue', 'partially_paid']))
@endif