@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
|
|
| 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) }} |
|