@php $orderItems = $orderItems ?? [ [ 'name' => 'Silk Saree', 'category' => 'Saree', 'unit' => '1', 'price' => 1000, 'qty' => 1, ], [ 'name' => 'Cotton Saree', 'category' => 'Saree', 'unit' => '1', 'price' => 1000, 'qty' => 1, ], [ 'name' => 'Kurta', 'category' => 'Saree', 'unit' => '1', 'price' => 1000, 'qty' => 1, ], [ 'name' => 'Dhoti', 'category' => 'Dhoti', 'unit' => '1', 'price' => 1000, 'qty' => 1, ], [ 'name' => 'Shirt', 'category' => 'Mens Collection', 'unit' => '1', 'price' => 1000, 'qty' => 1, ], ]; $itemsAmount = collect($orderItems)->sum(function ($item) { return (float) data_get($item, 'price', 0) * (int) data_get($item, 'qty', 1); }); $subtotal = $subtotal ?? $itemsAmount; $tax = $tax ?? 0; $shippingCharge = $shippingCharge ?? 0; $totalAmount = $totalAmount ?? ($subtotal + $tax + $shippingCharge); @endphp

{{ $shopName ?? 'Raja Gopal Handloom' }}

{{ $shopPhone ?? '+91 123 456 7890' }}
{{ $shopEmail ?? 'info@rajagopal.com' }}
{{ $shopWebsite ?? 'rajagopal.com' }}
Order ID: {{ $order->order_id ?? 'ORD112' }}
Order Date: {{ isset($order->created_at) ? $order->created_at->format('d/m/Y') : '26/09/2026' }}
Status: {{ $order->status ?? 'Delivered' }}

Order Items

@forelse ($orderItems as $item) @php $price = (float) data_get($item, 'price', 0); $qty = (int) data_get($item, 'qty', 1); @endphp @empty @endforelse
S No Product Category Unit Price Qty Total
{{ $loop->iteration }} {{ data_get($item, 'name', 'Product') }} {{ data_get($item, 'category', '-') }} {{ data_get($item, 'unit', '-') }} ₹{{ number_format($price, 2) }} {{ $qty }} ₹{{ number_format($price * $qty, 2) }}
No order items found.
Subtotal ₹{{ number_format($subtotal, 2) }}
@if ($tax > 0)
Tax ₹{{ number_format($tax, 2) }}
@endif
Shipping ₹{{ number_format($shippingCharge, 2) }}
Total Amount ₹{{ number_format($totalAmount, 2) }}