@php $currencySymbol = App\Models\AppSetting::getValue('currency_symbol', '?'); $decimals = App\Models\AppSetting::currencyDecimals(); $orderItems = is_array($order->items) ? $order->items : (json_decode((string) $order->items, true) ?: []); @endphp

FOOD DELIVERY

Your Food Delivery Partner

123 Delivery Street, City, State - 123456
Phone: +91 9876543210 | Email: support@fooddelivery.com

Order Number: {{ $order->order_number }} Order Date: {{ $order->created_at->format('d M Y, h:i A') }}
Payment Method: {{ ucfirst($order->payment_method) }} Payment Status: {{ ucfirst($order->payment_status) }}
Order Status: {{ ucfirst($order->status) }}

Customer Information

Name: {{ $order->customer_name }}
Phone: {{ $order->customer_phone }}
Delivery Address: {{ $order->delivery_address }}

Order Items

@forelse($orderItems as $item) @php $itemName = $item['name'] ?? $item['item_name'] ?? data_get($item, 'menu_item.name') ?? 'Item'; $quantity = (int) ($item['quantity'] ?? $item['qty'] ?? 1); $price = (float) ($item['unit_price'] ?? $item['price'] ?? 0); $lineTotal = (float) ($item['total_price'] ?? $item['total'] ?? ($price * $quantity)); if ($price <= 0 && $quantity > 0 && $lineTotal > 0) { $price = $lineTotal / $quantity; } @endphp @empty @endforelse
Item Quantity Price Total
{{ $itemName }} {{ $quantity }} {{ $currencySymbol }}{{ number_format($price, $decimals) }} {{ $currencySymbol }}{{ number_format($lineTotal, $decimals) }}
No items found

Subtotal: {{ $currencySymbol }}{{ number_format($order->subtotal, $decimals) }}

Delivery Fee: {{ $currencySymbol }}{{ number_format($order->delivery_fee, $decimals) }}

Platform Fee: {{ $currencySymbol }}{{ number_format($order->platform_fee ?? 0, $decimals) }}

Taxes & Charges: {{ $currencySymbol }}{{ number_format($order->tax, $decimals) }}

@if($order->discount > 0)

Coupon Discount: -{{ $currencySymbol }}{{ number_format($order->discount, $decimals) }}

@endif

Total Bill Payable: {{ $currencySymbol }}{{ number_format($order->total, $decimals) }}