@php $fmt = fn ($v) => '$'.number_format((float) $v, 2); $statusChip = [ 'paid' => 'bg-green-500/15 text-green-400', 'open' => 'bg-amber-500/15 text-amber-400', 'draft' => 'bg-slate-500/15 text-slate-400', 'void' => 'bg-slate-600/20 text-slate-500', 'refunded' => 'bg-indigo-500/15 text-indigo-300', 'partially_refunded' => 'bg-indigo-500/15 text-indigo-300', 'uncollectible' => 'bg-red-500/15 text-red-400', ]; @endphp
@forelse ($invoices as $inv) @empty @endforelse
Invoice Customer Amount Status Issued Actions
{{ $inv->user?->name ?? '—' }}
{{ $inv->user?->email }}
{{ $fmt($inv->total) }} {{ str_replace('_', ' ', $inv->status) }} {{ optional($inv->issued_at)->format('M j, Y') ?? '—' }}
@unless ($inv->isPaid()) @endunless
No invoices found.
{{ $invoices->links('pagination.dark') }}
{{-- View modal --}} @if ($viewing)

{{ $viewing->invoice_number }}

{{ $viewing->user?->name }} · {{ $viewing->user?->email }}

Status
{{ str_replace('_', ' ', $viewing->status) }}
Issued
{{ optional($viewing->issued_at)->format('M j, Y') ?? '—' }}
Due
{{ optional($viewing->due_at)->format('M j, Y') ?? '—' }}
@foreach ($viewing->items as $item) @endforeach
ItemQtyAmount
{{ $item->description }}{{ $item->quantity }}{{ $fmt($item->amount) }}
Subtotal{{ $fmt($viewing->subtotal) }}
@if ((float) $viewing->discount_total > 0)
Discount− {{ $fmt($viewing->discount_total) }}
@endif @if ((float) $viewing->tax_total > 0)
{{ $viewing->tax_label ?? 'Tax' }}{{ $fmt($viewing->tax_total) }}
@endif
Total{{ $fmt($viewing->total) }}
@endif