@if($logoSrc)
|
|
@endif
{{ $r['business']['name'] }}
{{ $r['business']['location'] }}@if($r['business']['location'] && $phone) · @endif{!! $phone !!}
|
{{ $r['is_closed'] ? 'End of Shift' : 'Preview (register still open)' }}
Z REPORT
{{ $r['report_no'] }}
|
|
| Cashier |
{{ $r['cashier']->name ?? 'Unknown' }} ({{ $r['cashier']->email ?? '' }}) |
@if($r['location'])
| Location |
{{ $r['location'] }} |
@endif
| Opened |
{{ optional($r['opened_at'])->format('D, d M Y H:i') }} |
| {{ $r['is_closed'] ? 'Closed' : 'As at' }} |
{{ $r['closed_at']->format('D, d M Y H:i') }}
@if($r['duration']) · shift length {{ $r['duration'] }} @endif
|
|
@foreach([
['Gross Sales', formatCurrency($r['gross_sales'])],
['Transactions', number_format($r['sales_count'])],
['Items Sold', number_format($r['items_sold'])],
['Average Sale', formatCurrency($r['average_sale'])],
] as [$label, $value])
{{ $label }}
{{ $value }}
|
@endforeach
|
|
Payments Received
| Method |
Count |
Amount |
@forelse($r['payments'] as $p)
{{ $p['label'] }}
@if($p['split_amount'] > 0)
incl. {{ formatCurrency($p['split_amount']) }} from {{ $p['split_count'] }} split payment{{ $p['split_count'] > 1 ? 's' : '' }}
@endif
|
{{ number_format($p['count']) }} |
{{ formatCurrency($p['amount']) }} |
@empty
| No payments recorded |
@endforelse
| Total |
|
{{ formatCurrency(collect($r['payments'])->sum('amount')) }} |
@if($r['total_due'] > 0)
Outstanding (unpaid) balance on sales: {{ formatCurrency($r['total_due']) }}
@endif
|
@if($r['split_sales']->isNotEmpty())
|
Split Payments ({{ $r['split_sales']->count() }})
| Time |
Invoice |
Paid with |
Total |
@foreach($r['split_sales'] as $t)
| {{ \Carbon\Carbon::parse($t->created_at)->format('H:i') }} |
{{ $t->invoice_no }} |
@forelse($t->split as $part)
{{ $part['label'] }} {{ formatCurrency($part['amount']) }}
@empty
No breakdown recorded
@endforelse
|
{{ formatCurrency($t->total_amount) }} |
@endforeach
|
@endif
|
Cash Drawer
| Opening cash | {{ formatCurrency($r['opening_cash']) }} |
| + Cash sales | {{ formatCurrency($r['cash_sales']) }} |
@if($r['counted_cash'] !== null)
@php $v = $r['cash_variance']; @endphp
| Expected in drawer | {{ formatCurrency($r['expected_cash']) }} |
| Counted by cashier | {{ formatCurrency($r['counted_cash']) }} |
| {{ $v < 0 ? 'Short' : ($v > 0 ? 'Over' : 'Difference') }} |
{{ abs($v) < 0.01 ? 'Balanced' : ($v < 0 ? '−' : '+') . formatCurrency(abs($v)) }}
|
@else
| Expected in drawer | {{ formatCurrency($r['expected_cash']) }} |
@endif
|
Profit
| Gross sales | {{ formatCurrency($r['gross_sales']) }} |
| − Cost of sales | {{ formatCurrency($r['cost_of_sales']) }} |
| Gross profit | {{ formatCurrency($r['gross_profit']) }} |
@if($r['profit_incomplete'])
Some items had no recorded cost, so profit may be overstated.
@endif
|
|
@php
$alerts = $r['integrity_events']->whereIn('severity', ['medium', 'high', 'critical']);
$lowCount = $r['integrity_events']->where('severity', 'low')->count();
$sevColor = ['medium' => '#0369a1', 'high' => '#b45309', 'critical' => '#b91c1c'];
@endphp
@if($r['integrity_events']->isNotEmpty())
|
Integrity Alerts
@if($alerts->isNotEmpty())
@foreach($alerts as $a)
| {{ $a->created_at->format('H:i') }} |
{{ $a->severity }}
{{ $a->label }}
{{ $a->description }}
|
@endforeach
@endif
@if($lowCount)
{{ $lowCount }} item(s) were removed from carts before payment during this shift.
@endif
Review these under Loss Prevention in the system.
|
@endif
|
Products Sold
| Product |
Qty |
Amount |
@forelse($r['products'] as $p)
{{ $p->name ?? 'Deleted product' }}@if($p->sku) {{ $p->sku }}@endif |
{{ number_format($p->qty) }} |
{{ formatCurrency($p->amount) }} |
@empty
| No products sold |
@endforelse
|
|
Transactions
| Time |
Invoice |
Customer |
Payment |
Amount |
@forelse($r['transactions']->take($txLimit) as $t)
| {{ \Carbon\Carbon::parse($t->created_at)->format('H:i') }} |
{{ $t->invoice_no }}@if($t->is_edited) (edited)@endif |
{{ $t->customer_name ?: 'Walk-In Customer' }} |
@if($t->split)
Split
@foreach($t->split as $part)
{{ $part['label'] }} {{ formatCurrency($part['amount']) }}
@endforeach
@else
{{ $t->payment_label }}
@endif
|
{{ formatCurrency($t->total_amount) }} |
@empty
| No transactions during this shift |
@endforelse
@if($r['transactions']->count() > $txLimit)
Showing the first {{ $txLimit }} of {{ $r['transactions']->count() }} transactions. The full list is in the attached CSV.
@endif
@if($r['edited_count'] > 0)
{{ $r['edited_count'] }} sale(s) in this shift were edited after being made.
@endif
|
@if($r['is_closed'])
Generated on {{ $r['generated_at']->format('d M Y H:i') }} for the register closed at {{ $r['closed_at']->format('H:i') }}.
@else
Preview generated on {{ $r['generated_at']->format('d M Y H:i') }}. The register is still open, so figures may change.
@endif
A CSV copy of this report is attached. Manage who receives these emails under Notifications.
|
|
{{ $r['business']['name'] }}@if($phone) · {!! $phone !!}@endif
|