@php $optionsSum = static fn($item) => $item->options->sum('additional_price'); $settings = app(\App\Settings\GeneralSettings::class); $branch = $order->branch; // Prefer Branch details if set, otherwise fallback to General Settings $companyName = $branch?->name ?? $settings->name; $address = $branch?->address ?? $settings->address; $phone = $branch?->phone ?? $settings->phone; $taxId = $settings->tax_id; $footer = $settings->receipt_notes; $createdAt = optional($order->created_at)->format('d M Y h:i A'); @endphp
{{ $address }}
@if($phone)Phone: {{ $phone }}
@endif| Qty | Item Name | Price | Amount |
|---|---|---|---|
| {{ $item->qty }} |
{{ $item->name }}
@if($item->options->isNotEmpty())
@foreach ($item->options as $opt)
@endif
{{ $opt->name }} @if((float)$opt->additional_price !== 0.0) ({{ currency((float)$opt->additional_price) }}) @endif
@endforeach
|
{{ currency($item->base_price + $optionTotal) }} | {{ currency($lineTotal) }} |