{{-- Z report as a small PDF (App\Services\ZReportPdf). Built-in Helvetica only, no images, plain ASCII text: the file stays a few KB and nothing has to be embedded. Colours are the theme colours from Settings. --}} @php $r = $report; $m = fn ($v) => number_format((float) $v, 2); $variance = $r['cash_variance']; $brand = brand_color('primary'); $accent = brand_color('secondary'); $tint = brand_tint($brand, 0.92); $stripe = brand_tint($brand, 0.965); $contact = implode(' | ', array_filter([$r['business']['location'] ?? null, !empty($r['business']['telephone']) ? 'Tel ' . $r['business']['telephone'] : null])); @endphp
|
{{ $r['business']['name'] }}
@if($contact){{ $contact }} @endif
|
Z REPORT {{ $r['report_no'] }}
@unless($r['is_closed'])PREVIEW - REGISTER STILL OPEN @endunless
|
| Cashier {{ $r['cashier']->name ?? 'Unknown' }} |
Register #{{ $r['register']->id }}{{ $r['location'] ? ' ' . $r['location'] : '' }} |
Opened {{ $r['opened_at']?->format('d M Y H:i') }} |
{{ $r['is_closed'] ? 'Closed' : 'As at' }} {{ $r['closed_at']->format('d M Y H:i') }} ({{ $r['duration'] }}) |
Total sales {{ $m($r['gross_sales']) }} MWK |
Transactions {{ $r['sales_count'] }} avg {{ $m($r['average_sale']) }} |
Items sold {{ rtrim(rtrim(number_format($r['items_sold'], 2), '0'), '.') }} |
Gross profit {{ $m($r['gross_profit']) }} {{ $r['profit_incomplete'] ? 'some costs missing' : 'MWK' }} |
| Method | Count | Amount (MWK) |
|---|---|---|
| {{ $p['label'] }}@if($p['split_count']) (incl. {{ $m($p['split_amount']) }} from {{ $p['split_count'] }} split)@endif | {{ $p['count'] }} | {{ $m($p['amount']) }} |
| No sales | ||
| Total | {{ $m($r['gross_sales']) }} | |
| {{ \Carbon\Carbon::parse($t->created_at)->format('H:i') }} | {{ $t->invoice_no }} | {{ collect($t->split)->map(fn ($s) => $s['label'] . ' ' . $m($s['amount']))->implode(' + ') }} | {{ $m($t->total_amount) }} |
| Opening cash | {{ $m($r['opening_cash']) }} |
| + Cash received | {{ $m($r['cash_sales']) }} |
| - Paid out (expenses) | {{ $m($r['cash_paid_out']) }} |
| Expected in drawer | {{ $m($r['expected_cash']) }} |
| Counted by cashier | {{ $m($r['counted_cash']) }} |
| {{ $variance < 0 ? 'SHORT' : ($variance > 0 ? 'OVER' : 'Drawer balanced') }} | MWK {{ $m(abs((float) $variance)) }} |
| Gross sales | {{ $m($r['gross_sales']) }} |
| - Cost of sales{{ $r['profit_incomplete'] ? ' (some costs missing)' : '' }} | {{ $m($r['cost_of_sales']) }} |
| Gross profit | {{ $m($r['gross_profit']) }} |
| {{ $e->created_at->format('H:i') }} | {{ strtoupper($e->severity) }} | {{ \Illuminate\Support\Str::limit(\Illuminate\Support\Str::ascii($e->description), 150) }} |
| Product | Qty | Amount (MWK) |
|---|---|---|
| {{ \Illuminate\Support\Str::ascii($p->name ?? 'Deleted product') }} | {{ rtrim(rtrim(number_format((float) $p->qty, 2), '0'), '.') }} | {{ $m($p->amount) }} |
{{ $r['business']['name'] }} | Generated {{ $r['generated_at']->format('d M Y H:i') }}{{ setting('powered_by') ? ' - ' . setting('powered_by') : '' }}