@php /* Precompute all conditional CSS values so no @if is needed inside {{-- Paper-specific CSS injected via @if OUTSIDE the @else @endif
|
{{ $org->name }}
@if($org->legal_name && $org->legal_name !== $org->name)
{{ $org->legal_name }}
@endif
@if($org->address)
{{ $org->address }}
@endif
@if($org->email || $org->contact)
{{ implode(' · ', array_filter([$org->email, $org->contact])) }}
@endif
|
SALE RECEIPT
@if(isset($primaryReceipt))
{{ $primaryReceipt->receipt_number }}
@endif
Sale Ref: {{ $sale->sale_reference }}
{{ \Carbon\Carbon::parse($sale->sale_date)->format('d M Y, H:i') }}
{{ strtoupper(str_replace('_', ' ', $sale->status)) }}
|
|
Customer: {{ $sale->customer?->name ?? 'Walk-in Customer' }} @if($sale->customer?->contact) {{ $sale->customer->contact }} @endif @if($sale->customer?->email) {{ $sale->customer->email }} @endif |
Outlet: {{ $sale->location?->name ?? '—' }} @if($sale->handledBy) Cashier: {{ $sale->handledBy->name }} @endif Currency: {{ $src }} @if($isMultiCurrency) (Base: {{ $base }}, Rate: {{ number_format((float) $sale->exchange_rate, 4) }}) @endif |
| Product | Qty | Price | Total | @if($isMultiCurrency && $paper !== 'thermal')Base ({{ $base }}) | @endif
|---|---|---|---|---|
|
{{ $item->product?->name ?? '—' }}
{{ $item->product?->sku }}
|
{{ $fmt($item->quantity, 2) }} | {{ $fmt($item->negotiated_price_source, 2) }} | {{ $fmt($item->line_total_source, 2) }} | @if($isMultiCurrency && $paper !== 'thermal'){{ $fmt($item->line_total_base, 2) }} | @endif
| Subtotal | {{ $src }} {{ $fmt($sale->subtotal_source, 2) }} |
| Discount @if($sale->discountConfiguration) ({{ $sale->discountConfiguration->name }})@endif | − {{ $src }} {{ $fmt($sale->discount_amount_source, 2) }} |
| After discount (taxable) | {{ $src }} {{ $fmt((float)$sale->subtotal_source - (float)$sale->discount_amount_source, 2) }} |
| Tax @if($sale->taxRate)({{ $sale->taxRate->rate }}%)@endif | {{ $src }} {{ $fmt($sale->tax_amount_source, 2) }} |
| Delivery | {{ $src }} {{ $fmt($sale->delivery_fee_source, 2) }} |
| TOTAL | {{ $src }} {{ $fmt($sale->total_amount_source, 2) }} |
| ≈ {{ $base }} | {{ $fmt($sale->total_amount_base, 2) }} |
| Paid | {{ $src }} {{ $fmt($sale->amount_paid_source, 2) }} |
| Balance Due | {{ $src }} {{ $fmt($balance, 2) }} |
| Subtotal | {{ $src }} {{ $fmt($sale->subtotal_source, 2) }} | |
| Discount @if($sale->discountConfiguration) ({{ $sale->discountConfiguration->name }})@endif | − {{ $src }} {{ $fmt($sale->discount_amount_source, 2) }} | |
| After discount (taxable base) | {{ $src }} {{ $fmt((float)$sale->subtotal_source - (float)$sale->discount_amount_source, 2) }} | |
| Tax @if($sale->taxRate)({{ $sale->taxRate->name }} {{ $sale->taxRate->rate }}%{{ $sale->taxRate->is_inclusive ? ' incl.' : '' }})@endif | {{ $src }} {{ $fmt($sale->tax_amount_source, 2) }} | |
|
Delivery ({{ ucfirst(str_replace('_', ' ', $sale->delivery_type)) }})
@if($sale->delivery_address) {{ $sale->delivery_address }}@endif |
{{ $src }} {{ $fmt($sale->delivery_fee_source, 2) }} | |
| TOTAL | {{ $src }} {{ $fmt($sale->total_amount_source, 2) }} | |
| ≈ Base ({{ $base }}) | {{ $fmt($sale->total_amount_base, 2) }} | |
| Amount Paid | {{ $src }} {{ $fmt($sale->amount_paid_source, 2) }} | |
| Balance Due | {{ $src }} {{ $fmt($balance, 2) }} | |
| Method | Reference | Amount ({{ $src }}) | @if($isMultiCurrency)Base ({{ $base }}) | @endif
|---|---|---|---|
| {{ ucwords(str_replace('_', ' ', $payment->payment_method)) }} | {{ $payment->reference ?? '—' }} | {{ $fmt($payment->amount_source, 2) }} | @if($isMultiCurrency){{ $fmt($payment->amount_base, 2) }} | @endif
| Product | Serial Number(s) |
|---|---|
| {{ $item->product?->name }} | {{ $item->serial_numbers->pluck('serial_number')->implode(', ') }} |
Thank you for your business!
Scan QR to verify receipt · Sale Ref: {{ $sale->sale_reference }}
© {{ date('Y') }} {{ $org->name }}. All rights reserved.
@if($org->email || $org->contact){{ implode(' · ', array_filter([$org->email, $org->contact])) }}
@endif