@php $accent = '#7c3aed'; $money = fn ($v) => $invoice->currency.' '.number_format((float) $v, 2); $statusColors = [ 'paid' => ['#065f46', '#d1fae5'], 'open' => ['#92400e', '#fef3c7'], 'draft' => ['#374151', '#e5e7eb'], 'void' => ['#7f1d1d', '#fee2e2'], 'refunded' => ['#3730a3', '#e0e7ff'], 'partially_refunded' => ['#3730a3', '#e0e7ff'], 'uncollectible' => ['#7f1d1d', '#fee2e2'], ]; [$stFg, $stBg] = $statusColors[$invoice->status] ?? ['#374151', '#e5e7eb']; $addr = $invoice->billingAddress; @endphp
{{ $company['name'] ?? config('app.name') }}
@if (!empty($company['address']))
{{ $company['address'] }}
@endif @if (!empty($company['email']))
{{ $company['email'] }}
@endif @if (!empty($company['tax_number']))
Tax ID: {{ $company['tax_number'] }}
@endif

INVOICE

{{ $invoice->invoice_number }}
{{ str_replace('_', ' ', $invoice->status) }}

Bill To

{{ $addr->name ?? $invoice->user->name }}
@if ($addr) @if ($addr->company)
{{ $addr->company }}
@endif
{{ $addr->line1 }}@if ($addr->line2), {{ $addr->line2 }}@endif
{{ trim(collect([$addr->city, $addr->state, $addr->postal_code])->filter()->implode(', ')) }}
@if ($addr->country)
{{ $addr->country }}
@endif @if ($addr->tax_number)
Tax ID: {{ $addr->tax_number }}
@endif @else
{{ $invoice->user->email }}
@endif
@if ($invoice->paid_at) @endif @if ($invoice->billing_cycle) @endif
Issue Date{{ optional($invoice->issued_at)->format('M j, Y') ?? '—' }}
Due Date{{ optional($invoice->due_at)->format('M j, Y') ?? '—' }}
Paid Date{{ $invoice->paid_at->format('M j, Y') }}
Billing Cycle{{ ucfirst($invoice->billing_cycle) }}
@foreach ($invoice->items as $item) @endforeach
Description Qty Unit Price Amount
{{ $item->description }} @if ($item->period_start && $item->period_end)
{{ $item->period_start->format('M j, Y') }} – {{ $item->period_end->format('M j, Y') }}
@endif
{{ $item->quantity }} {{ $money($item->unit_amount) }} {{ $money($item->amount) }}
@if ((float) $invoice->discount_total > 0) @endif @if ((float) $invoice->tax_total > 0) @endif @if ((float) $invoice->amount_paid > 0) @endif @if ((float) $invoice->amount_due > 0) @endif
Subtotal{{ $money($invoice->subtotal) }}
Discount− {{ $money($invoice->discount_total) }}
{{ $invoice->tax_label ?? 'Tax' }}{{ $money($invoice->tax_total) }}
Total{{ $money($invoice->total) }}
Amount Paid{{ $money($invoice->amount_paid) }}
Amount Due{{ $money($invoice->amount_due) }}
@if ($invoice->notes)
{{ $invoice->notes }}
@endif
Thank you for your business. @if (!empty($company['website'])) · {{ $company['website'] }} @endif · {{ $invoice->invoice_number }}