{{-- ── Header ── --}}
{{ $settings['business_name'] ?? config('app.name') }}
@if(!empty($settings['business_tagline']))
{{ $settings['business_tagline'] }}
@endif @if(!empty($settings['address']))
{{ $settings['address'] }}
@endif @if(!empty($settings['phone']))
Tel: {{ $settings['phone'] }}
@endif
Account Statement
{{ $from->format('d M Y') }} — {{ $to->format('d M Y') }}
Generated: {{ now()->format('d M Y H:i') }}
{{-- ── Client Meta ── --}}
Prepared For
{{ $client->full_name }}
@if($client->phone)
{{ $client->phone }}
@endif @if($client->email)
{{ $client->email }}
@endif
Statement Period
{{ $from->format('d M Y') }}
to {{ $to->format('d M Y') }}
Total Transactions
{{ $summary['total_sales'] }}
visits in period
{{-- ── Summary Cards ── --}}
Gross Total
KSh {{ number_format($summary['gross_total'], 2) }}
Total Paid
KSh {{ number_format($summary['total_paid'], 2) }}
@if($summary['total_discount'] > 0)
Discounts
KSh {{ number_format($summary['total_discount'], 2) }}
@endif
Balance Due
KSh {{ number_format($summary['balance_due'], 2) }}
{{-- ── Transactions Table ── --}}
Transaction History
@forelse($sales as $sale) @php $services = collect($sale->service_items ?? []) ->map(fn($si) => $si['service_name'] ?? $si['name'] ?? 'Service') ->unique()->implode(', '); $products = $sale->items->map(fn($i) => $i->product?->name ?? 'Product')->implode(', '); $desc = implode('; ', array_filter([$services, $products])) ?: '—'; $balance = $sale->remaining_balance; $statusClass = match($sale->status) { 'completed' => 'badge-green', 'partial' => 'badge-yellow', default => 'badge-red', }; @endphp @empty @endforelse
Date Reference Services / Items Total Paid Balance Status
{{ $sale->sale_date->format('d M Y') }} {{ $sale->reference_no }} {{ $desc }} {{ number_format($sale->total, 2) }} {{ number_format($sale->total_paid, 2) }} {{ number_format($balance, 2) }} {{ ucfirst($sale->status) }}
No transactions found for this period.
{{-- ── Totals ── --}}
Gross Total KSh {{ number_format($summary['gross_total'], 2) }}
@if($summary['total_discount'] > 0)
Discounts - KSh {{ number_format($summary['total_discount'], 2) }}
@endif
Total Paid KSh {{ number_format($summary['total_paid'], 2) }}
Balance Due KSh {{ number_format($summary['balance_due'], 2) }}
{{-- ── Footer ── --}}
{{ $settings['receipt_footer'] ?? 'Thank you for your continued business.' }}