@php $store = $sale->store; $company = setting('company_name', 'Primewear'); $website = setting('website', 'www.primewear.co.za'); $address = setting('company_address') ?: null; if (! $address) { $address = trim(($store->address ?? '').(($store->city ?? '') ? ', '.$store->city : '')); } $address = $address ?: '23 Main Reef Road, Crown Mines, Johannesburg, 2025'; $phone = setting('company_phone') ?: ($store->phone ?: '+27 744 887 987'); $vat = setting('vat_number') ?: ($store->vat_number ?: '4820291234'); $reg = setting('company_registration', '2023/123456/07'); $instagram = setting('social_instagram', '@primewear.za'); $facebook = setting('social_facebook', 'Primewear.za'); $tiktok = setting('social_tiktok', '@primewear.za'); $webHandle = setting('social_web', 'Primewear.za'); $activePayments = collect($sale->payments)->filter(fn ($p) => empty($p->reversed) && (($p->direction ?? 'in') === 'in')); $itemCount = collect($sale->items)->count(); $totalQty = (int) collect($sale->items)->sum(fn ($i) => (int) $i->qty); $logo = file_exists(public_path('images/primewear-logo.jpg')) ? url('/images/primewear-logo.jpg') : url('/images/primewear-logo.png'); $qr = \App\Support\ReceiptQr::ensureFile($website); $rm = fn ($amount) => \App\Support\Money::slip($amount); @endphp {{-- Thermal-safe layout: HTML TABLES only (no flex/grid). Electron + PD-POS80 drivers collapse flex into jammed text like "SUBTOTALR399.00". --}}
PRIMEWEAR
{{ $address }}
{{ $phone }}
VAT No: {{ $vat }}
Registration No: {{ $reg }}

RETAIL INVOICE
INVOICE: {{ $sale->number }}
DATE: {{ \Illuminate\Support\Carbon::parse($sale->created_at)->format('d/m/Y, h:i A') }}
CUSTOMER: {{ $sale->customer->name ?? 'Walk-in Customer' }}

ITEM QTY AMT

@foreach(collect($sale->items) as $item)
{{ $item->description }}
@if(!empty($item->variant?->sku))
SKU: {{ $item->variant->sku }}
@endif
{{ $rm($item->unit_price) }} @if(isset($item->list_price) && $item->list_price !== null && (float) $item->list_price > (float) $item->unit_price) was {{ $rm($item->list_price) }} @endif x{{ $item->qty }} {{ $rm($item->line_total) }}
@if(! $loop->last)
@endif @endforeach
@if((float) ($sale->discount_total ?? 0) > 0) @endif
SUBTOTAL {{ $rm($sale->subtotal) }}
DISCOUNT - {{ $rm($sale->discount_total) }}

TOTAL {{ $rm($sale->total) }}

@foreach($activePayments as $payment) @if((float) ($payment->change_amount ?? 0) > 0) @endif
Payment: {{ ucfirst($payment->method) }} {{ $rm($payment->amount) }}
Change {{ $rm($payment->change_amount) }}
@endforeach
No. of Items: {{ $itemCount }} | Total Quantity: {{ $totalQty }}

Exchanges within {{ setting('return_window_days', 14) }} days with original hang tags and labels. Subject to applicable consumer rights.@unless(\App\Models\Setting::bool('refunds_allowed')) No cash refunds.@endunless
Thank you
for shopping with {{ $company }}.
QR
Scan to visit our website
{{ $webHandle }} | {{ $instagram }} | {{ $facebook }} | {{ $tiktok }}
All prices are inclusive of taxes.