@php $accent = $invoiceSettings->accent_color ?? '#FFB7C5'; $hex = ltrim($accent, '#'); $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); // 92% white + 8% accent → very light tint $tint = sprintf( '#%02X%02X%02X', (int) (255 * 0.92 + $r * 0.08), (int) (255 * 0.92 + $g * 0.08), (int) (255 * 0.92 + $b * 0.08) ); // 80% white + 20% accent → medium-light tint (for borders) $tintMid = sprintf( '#%02X%02X%02X', (int) (255 * 0.80 + $r * 0.20), (int) (255 * 0.80 + $g * 0.20), (int) (255 * 0.80 + $b * 0.20) ); @endphp
{{-- ── Header ─────────────────────────────────────────────────── --}}
|
{{ $invoice->invoice_number }}
|
|
Bill To
@if($invoice->client)
{{ $invoice->client->name }}
@if($invoice->client->company)
{{ $invoice->client->company }} @endif
@if($invoice->client->email)
{{ $invoice->client->email }} @endif
@if($invoice->client->full_address)
{{ $invoice->client->full_address }} @endif
@else
—
@endif
|
Invoice Details
|
| Description | Qty | Unit Price | Total |
| {{ $item->description }} @if(!$item->is_taxable) Non-Taxable @endif | {{ $item->quantity }} | Rp {{ number_format($item->unit_price, 0, ',', '.') }} | Rp {{ number_format($item->total, 0, ',', '.') }} |
| Subtotal | Rp {{ number_format($invoice->subtotal, 0, ',', '.') }} |
| Tax ({{ $invoice->tax_rate }}% — paid by client) | Rp {{ number_format($invoice->tax_amount, 0, ',', '.') }} |
| Grand Total | {{ $invoice->formatted_total }} |