@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 ─────────────────────────────────────────────────── --}}
@if($invoiceSettings->header_logo && file_exists(storage_path('app/public/' . $invoiceSettings->header_logo))) @endif
Logo
{{ $invoiceSettings->header_name ?: 'Cathy' }}
{{ $invoiceSettings->header_title ?: 'Personal Talent Assistant' }}
{{ $invoice->invoice_number }}
{{-- ── Billing Info ─────────────────────────────────────────────── --}}
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
@if($invoice->paid_date) @endif
Issue Date {{ $invoice->issue_date->format('d M Y') }}
Due Date {{ $invoice->due_date->format('d M Y') }}
Paid Date {{ $invoice->paid_date->format('d M Y') }}
{{-- ── Line Items ───────────────────────────────────────────────── --}} @foreach($invoice->items as $item) @endforeach
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, ',', '.') }}
{{-- ── Totals ───────────────────────────────────────────────────── --}}
@if($invoice->tax_rate > 0) @endif
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 }}
{{-- ── Payment Info ──────────────────────────────────────────────── --}} @if($invoice->bank_name)
Payment Information
{{ $invoice->bank_name }} @if($invoice->branch_name) · {{ $invoice->branch_name }} @endif · {{ $invoice->bank_account }} · a/n {{ $invoice->bank_holder }}
@endif @if($invoice->notes)
{{ $invoice->notes }}
@endif