@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
{{ ($r['tax_number'] ?? '') !== '' ? $r['tax_number'] : 'VAT 12-3456789' }}
@endif @if (($cfg['footer'] ?? '') !== '' || $on('powered'))