@php /** * A self-contained SAMPLE receipt (front) for a config - the thumbnail source for the receipt template * gallery + admin page. Renders a representative thermal ticket from a receipt config + a brand/contact * backdrop (the demo restaurant, or SampleContext when there is none), reusing App\Services\Receipt for * the paper width + type styling so a thumbnail matches the live designer exactly. * * @var array $cfg a receipt config (Receipt::defaults() shape) * @var array $restaurant brand/contact backdrop (name/logo/address/phone/website/tax_number) */ use App\Services\Receipt; $cfg = (isset($cfg) && is_array($cfg)) ? array_merge(Receipt::defaults(), array_intersect_key($cfg, Receipt::defaults())) : Receipt::defaults(); $r = $restaurant ?? []; $cur = setting('currency_symbol', '$'); $on = static fn (string $k): bool => !empty($cfg[$k]); $dir = is_rtl() ? 'rtl' : 'ltr'; @endphp {{ t_raw('admin.design_templates.edit_receipt') }}
@if ($on('logo') && (($r['logo'] ?? '') !== ''))@endif {{ $r['name'] ?? t_raw('common.restaurant') }} @if (($cfg['headline'] ?? '') !== '')
{{ $cfg['headline'] }}
@endif
@if ($on('address')){{ $r['address'] ?? '123 Market Street, Your City' }}
@endif @if ($on('phone')){{ $r['phone'] ?? '(555) 000-0000' }}
@endif @if ($on('website')){{ $r['website'] ?? 'example.com' }}@endif

@if ($on('orderno'))
{{ t_raw('vendor.receipt.lbl_order') }}#A-0042
@endif @if ($on('ticket'))
{{ t_raw('vendor.receipt.lbl_table') }}{{ t_raw('vendor.receipt.svc_dinein') }} · 5
@endif @if ($on('server'))
{{ t_raw('vendor.receipt.lbl_server') }}Grace S.
@endif @if ($on('datetime'))
{{ t_raw('vendor.receipt.lbl_date') }}25 Jul, 7:42 PM
@endif
1 × Margherita Pizza{{ $cur }}14.00
@if ($on('modifiers'))
+ Extra cheese
@endif
2 × Garlic Bread{{ $cur }}9.00

{{ t_raw('checkout.subtotal') }}{{ $cur }}23.00
{{ t_raw('checkout.tax') }}{{ $cur }}2.07
@if ($on('tip'))
{{ t_raw('checkout.tip') }}{{ $cur }}3.00
@endif
{{ t_raw('common.total') }}{{ $cur }}28.07
@if ($on('pay_method'))
{{ t_raw('vendor.receipt.lbl_paid') }}{{ $cur }}30.00
@endif @if ($on('change'))
{{ t_raw('vendor.receipt.lbl_change') }}{{ $cur }}1.93
@endif @if ($on('show_tax_number'))

{{ ($r['tax_number'] ?? '') !== '' ? $r['tax_number'] : 'VAT 12-3456789' }}

@endif @if (($cfg['footer'] ?? '') !== '' || $on('powered'))
@if (($cfg['footer'] ?? '') !== '')
{{ $cfg['footer'] }}
@endif @if ($on('powered'))
{{ t_raw('vendor.receipt.powered_by') }} {{ setting('site_name', 'QuickMunch') }}
@endif
@endif