@php $cms = $cms ?? \App\Models\CmsSetting::instance(); @endphp Customer Receipt @include('print.partials.branding-header')

Order #: {{ $order->id }}

@if($order->order_type === 'dine_in')

Table No: {{ $order->table->no ?? '-' }}

@endif

Date: {{ $order->created_at->format('M j, Y h:i A') }}

Order Type: {{ ucwords(str_replace('_', ' ', $order->order_type)) }}

@include('print.partials.contact-lines')
@foreach ($order->items as $item) @endforeach
Item Qty Price Total
{{ $item->product->name }} {{ $item->quantity }} {{ number_format($item->price) }} {{ number_format($item->total) }}
@php $itemsTotal = $order->items->sum('total'); $discountAmount = 0; if ($order->discount_percentage > 0) { $discountAmount = round($itemsTotal * $order->discount_percentage / 100, 2); } elseif ($order->manual_discount > 0) { $discountAmount = $order->manual_discount; } $grandTotal = $itemsTotal - $discountAmount + $order->service_charges + $order->delivery_charges + ($order->gst_tax ?? 0) + ($order->pra_tax ?? 0); @endphp @if ($order->discount_percentage > 0) @elseif ($order->manual_discount > 0) @endif @if ($order->service_charges > 0) @endif @if (!empty($order->pra_tax) && $order->pra_tax > 0) @endif @if (!empty($order->gst_tax) && $order->gst_tax > 0) @endif @if ($order->delivery_charges > 0) @endif
Subtotal Rs {{ number_format($itemsTotal) }}
Discount ({{ (int) $order->discount_percentage }}%) -Rs {{ number_format($discountAmount) }}
Discount (Manual) -Rs {{ number_format($discountAmount) }}
Service Charges (7%) Rs {{ number_format($order->service_charges) }}
PRA TAX (8%) Rs {{ number_format($order->pra_tax) }}
GST Tax Rs {{ number_format($order->gst_tax) }}
Delivery Charges Rs {{ number_format($order->delivery_charges) }}
Grand Total Rs {{ number_format($grandTotal) }}
@include('print.partials.social-icons')
@include('print.partials.frame-print-script', ['action' => 'receipt'])