@php $sym = config('pos.company.currency_symbol'); $billable = $split ?? $order; $lines = ($split ? $split->items : $order->items)->where('status', '!=', 'void'); $happySaved = $lines->sum(fn ($i) => $i->original_price ? ((float) $i->original_price - (float) $i->unit_price) * $i->quantity : 0); $proforma = ! $split && (bool) ($order->proforma ?? false); @endphp
{{ config('pos.company.name') }}
@if (config('pos.company.address'))
{{ config('pos.company.address') }}
@endif @if (config('pos.company.phone'))
{{ config('pos.company.phone') }}
@endif @if (config('pos.company.kra_pin'))
PIN: {{ config('pos.company.kra_pin') }}
@endif @if (config('pos.company.till_number') || config('pos.company.paybill_number'))
@if (config('pos.company.till_number')) Till: {{ config('pos.company.till_number') }} @endif @if (config('pos.company.till_number') && config('pos.company.paybill_number')) · @endif @if (config('pos.company.paybill_number')) Paybill: {{ config('pos.company.paybill_number') }} @endif
@endif @if ($proforma)
BILL — NOT A RECEIPT
@endif
Order: {{ $order->order_number }}
@if ($split)
{{ $split->label }}
@endif
{{ $order->table->name ?? $order->sale_type->label() }}
Waiter: {{ $order->waiter->name ?? '-' }}@if ($order->cashier) · Cashier: {{ $order->cashier->name }}@endif
{{ now()->format('d M Y, H:i') }}

@forelse ($lines as $item) @empty @endforelse
{{ $item->quantity }}x {{ $item->product->name }}@if ($item->discount_percent > 0) (-{{ rtrim(rtrim(number_format($item->discount_percent, 2), '0'), '.') }}%)@endif {{ number_format($item->line_total, 2) }}
No items

@if ($happySaved > 0) @endif @if (! $split) @endif
Subtotal{{ number_format($billable->subtotal, 2) }}
Happy hour saved you{{ number_format($happySaved, 2) }}
Discount-{{ number_format($billable->discount_total, 2) }}
Service charge{{ number_format($order->service_charge_total, 2) }}
VAT{{ number_format($billable->tax_total, 2) }}
Levy{{ number_format($billable->levy_total, 2) }}
TOTAL{{ $sym }} {{ number_format($billable->grand_total, 2) }}

@if ($proforma)
Please settle with the cashier.
@else
Payments
@forelse (($split ? $split->payments : $order->payments) as $payment)
{{ $payment->paymentMethod->name ?? $payment->method }} {{ number_format($payment->amount, 2) }}
@if ($payment->reference_number)
Ref: {{ $payment->reference_number }}
@endif @empty
No payment recorded yet
@endforelse
Thank you for dining with us!
@endif