@extends('admin.layouts.app') @section('title', 'Order Details - ' . $order->order_number) @section('header_title', 'Order #' . $order->order_number) @section('content')

Order {{ $order->order_number }} {{ strtoupper($order->order_status) }}

Placed on {{ $order->created_at ? $order->created_at->format('M d, Y \a\t g:i A') : 'N/A' }}

@csrf @method('DELETE')

Order Items ({{ $order->items->sum('quantity') }}) Itemized Breakdown

@foreach($order->items as $item) @endforeach
Item SKU Unit Price Qty Subtotal
@if($item->product && $item->product->primary_image_url) {{ $item->product_name }} @else
@endif

{{ $item->product_name }}

@if($item->product) View in Catalog @endif
{{ $item->sku ?? 'N/A' }} ₹{{ number_format($item->price, 2) }} ×{{ $item->quantity }} ₹{{ number_format($item->subtotal, 2) }}

Customer Information

Full Name {{ $order->customer_name }}
Email Address {{ $order->customer_email ?? 'Not Provided' }}

Delivery Address

{{ $order->shipping_address }}

City: {{ $order->city }} PIN: {{ $order->pincode }}

Update Order Status

@csrf @method('PUT')

Payment Summary {{ strtoupper($order->payment_status) }}

Items Subtotal ₹{{ number_format($order->subtotal, 2) }}
Shipping Fee {{ $order->shipping_amount == 0 ? 'FREE' : '₹' . number_format($order->shipping_amount, 2) }}
@if($order->discount_amount > 0)
Discount -₹{{ number_format($order->discount_amount, 2) }}
@endif
Payment Method {{ strtoupper($order->payment_method) }}
Grand Total ₹{{ number_format($order->total_amount, 2) }}
@endsection