@php $paper = $settings['receipt_paper_width'] ?? '80'; $width = $paper === 'a4' ? '210mm' : ($paper === '58' ? '58mm' : '80mm'); $isA4 = $paper === 'a4'; $currency = $settings['currency'] ?? 'USD'; $method = $paymentMethods[$sale->payment_method]['label'] ?? ucfirst($sale->payment_method); $deviceSettingsPayload = [ 'mode' => $settings['device_connection_mode'] ?? 'browser', 'agentUrl' => $settings['local_print_agent_url'] ?? 'http://127.0.0.1:9109', 'autoReconnect' => ($settings['auto_reconnect_device'] ?? '1') === '1', 'baudRate' => (int) ($settings['web_serial_baud_rate'] ?? 9600), 'openCashDrawer' => ($settings['open_cash_drawer'] ?? '0') === '1', 'autoPrint' => ($settings['auto_print_receipt'] ?? '1') === '1', 'invoice' => $sale->invoice_no, ]; @endphp {{ $sale->invoice_no }} @if (! empty($settings['favicon_path'])) @endif
Back to POS
Device hub ready. Mode: {{ str_replace('_', ' ', $settings['device_connection_mode']) }}.
@if (! empty($settings['logo_path'])) {{ $settings['company_name'] }} @endif
{{ $settings['company_name'] }}
{{ $sale->branch->name }} - {{ $sale->branch->phone }}
{{ $sale->branch->address }}
@if ($isA4) @endif
Invoice{{ $sale->invoice_no }}
Date{{ $sale->created_at->format('d M Y h:i A') }}
Cashier{{ $sale->cashier->name }}
Customer{{ $sale->customer?->name ?? 'Walk-in' }}
Payment{{ $method }}
Terminal{{ $settings['billing_terminal_name'] }}
Printer ProfileA4 office invoice
@foreach ($sale->items as $item) @endforeach
Item Qty Amt
{{ $item->batch->brand->brand_name }}
{{ $item->batch->brand->medicine->generic_name }} {{ $item->batch->brand->medicine->strength }} / {{ $item->batch->batch_no }}
{{ $item->quantity }} {{ number_format($item->subtotal, 2) }}
Subtotal{{ $currency }} {{ number_format($sale->subtotal, 2) }}
Discount{{ $currency }} {{ number_format($sale->discount, 2) }}
Tax{{ $currency }} {{ number_format($sale->tax, 2) }}
Total{{ $currency }} {{ number_format($sale->total, 2) }}
Paid{{ $currency }} {{ number_format($sale->paid_amount, 2) }}
Due{{ $currency }} {{ number_format($sale->due_amount, 2) }}

{{ $settings['receipt_footer'] }}

Support: {{ $settings['support_phone'] }}

@if (request()->boolean('print')) @endif