Download PDF New certificate @if($invoice->quote_id) View Quote @endif
@if(session('success'))
{{ session('success') }}
@endif @error('workflow')
{{ $message }}
@enderror
{{-- Main panel --}}
{{-- Invoice header --}}

Bill To

{{ $invoice->customer->name }}

@if($invoice->customer->kra_pin)

KRA PIN: {{ $invoice->customer->kra_pin }}

@endif @if($invoice->customer->billing_address)

{{ $invoice->customer->billing_address }}

@endif

Issued: {{ $invoice->issued_at?->format('d M Y') ?? '—' }}

Due: {{ $invoice->due_at?->format('d M Y') ?? '—' }} @if($invoice->isOverdue()) (Overdue) @endif

{{-- Line items --}}
@foreach($invoice->items as $item) @endforeach
Description Qty Unit price VAT ({{ number_format((float)($invoice->items->first()?->tax_rate ?? 16), 0) }}%) Total
{{ $item->description }}

per {{ $item->unit }}

{{ number_format((float)$item->quantity, 2) }} KES {{ number_format((float)$item->unit_price, 2) }} KES {{ number_format((float)$item->tax_amount, 2) }} KES {{ number_format((float)$item->line_total, 2) }}
{{-- Totals --}}
Subtotal KES {{ number_format((float)$invoice->subtotal, 2) }}
@if((float)$invoice->discount_amount > 0)
Discount - KES {{ number_format((float)$invoice->discount_amount, 2) }}
@endif
VAT KES {{ number_format((float)$invoice->vat_amount, 2) }}
Total KES {{ number_format((float)$invoice->total_amount, 2) }}
@if((float)$invoice->amount_paid > 0)
Amount paid KES {{ number_format((float)$invoice->amount_paid, 2) }}
Balance due KES {{ number_format($invoice->balance_due, 2) }}
@endif
{{-- Payments --}} @if($invoice->payments->isNotEmpty())

Payments

@foreach($invoice->payments as $payment) @endforeach
Date Method Reference Amount Receipt Status
{{ $payment->paid_at->format('d M Y') }} {{ $payment->paymentMethod->name ?? '—' }} {{ $payment->mpesa_receipt_number ?? $payment->reference ?? '—' }} KES {{ number_format((float)$payment->amount, 2) }} @if($payment->receipt) {{ $payment->receipt->receipt_number }} @else Pending @endif @if($payment->status === 'confirmed') @can('payments.reverse')
Reverse
@csrf
@endcan @elseif($payment->reversal_reason)

{{ $payment->reversal_reason }}

@endif
@endif
{{-- Sidebar --}}