@include('templates.pdf_header', [ 'organisation' => $organisation, 'asOfDate' => $asOfDate, 'title' => 'INVOICE' ])
BILL TO
{{ $invoice->party->name ?? 'Client Name' }}
{{ $invoice->party->address ?? 'Client Address' }}
{{ $invoice->party->email ?? 'client@example.com' }}
{{ $invoice->party->phone ?? '(123) 456-7890' }}
INVOICE DETAILS
Issue Date: #{{ $invoice->invoice_number }}
Issue Date: {{ \Carbon\Carbon::parse($invoice->issue_date)->format('d M Y') }}
Due Date: {{ \Carbon\Carbon::parse($invoice->due_date)->format('d M Y') }} @php $dueDate = \Carbon\Carbon::parse($invoice->due_date); $today = \Carbon\Carbon::now(); if ($invoice->paid ?? false) { $statusClass = 'status-paid'; $statusText = 'Paid'; } elseif ($dueDate->isPast()) { $statusClass = 'status-overdue'; $statusText = 'Overdue'; } else { $statusClass = 'status-pending'; $statusText = 'Pending'; } @endphp {{ $statusText }}
Currency: {{ $invoice->currency->code ?? 'USD' }}
@foreach($invoice->invoiceLines as $index => $line) @endforeach
# Description Qty Unit Price Tax % Amount
{{ $index + 1 }} {{ $line->description }} {{ number_format($line->quantity, 2) }} {{ number_format($line->unit_price, 2) }} {{ number_format($line->tax_pct, 2) }} {{ number_format($line->line_total, 2) }}
@php $subTotal = $invoice->invoiceLines->sum(fn($l) => $l->quantity * $l->unit_price); $taxTotal = $invoice->invoiceLines->sum(fn($l) => ($l->quantity * $l->unit_price) * ($l->tax_pct / 100)); $grandTotal = $subTotal + $taxTotal; @endphp
Subtotal: {{ number_format($subTotal, 2) }}
Tax: {{ number_format($taxTotal, 2) }}
Total Due: {{ number_format($grandTotal, 2) }}
PAYMENT INFORMATION
Please include invoice number #{{ $invoice->invoice_number }} with your payment.
Bank Transfer Credit Card PayPal
@if($invoice->notes)
NOTES

{{ $invoice->notes }}

@endif