@php $fmt = fn ($v) => number_format((float) $v, 2) . ' ' . $shop->currency; $change = $sale->change_given; @endphp
| Invoice | {{ $sale->invoice_no }} |
| Date | {{ $sale->sold_at->timezone($shop->timezone)->format('Y-m-d H:i') }} |
| Served by | {{ $sale->user->name }} |
| Customer | {{ $sale->customer?->name ?? 'Walk-in' }} |
| Item | Qty | Price | Total |
|---|---|---|---|
| {{ $i->product_name }}
@if ((float) $i->discount > 0) discount -{{ number_format((float) $i->discount, 2) }}@endif |
{{ rtrim(rtrim(number_format((float) $i->quantity, 3, '.', ''), '0'), '.') }} | {{ number_format((float) $i->unit_price, 2) }} | {{ number_format((float) $i->total, 2) }} |
| Subtotal | {{ $fmt($sale->subtotal) }} |
| Discount | -{{ $fmt($sale->discount) }} |
| Tax | {{ $fmt($sale->tax) }} |
| TOTAL | {{ $fmt($sale->total) }} |
| {{ $p->method }}@if ($p->tendered !== null) (tendered {{ number_format((float) $p->tendered, 2) }})@endif | {{ $fmt($p->amount) }} |
| Change | {{ $fmt($change) }} |
| ON CREDIT | {{ $fmt($sale->due_amount) }} |
| Account balance | {{ $fmt($sale->customer->balance) }} |
Thank you!
@if (! $pdf) @if ($autoPrint)@endif @endif