@extends('admin.layout') @section('title', 'Order Details - ' . $order->order_number) @section('content')

Order Details #{{ $order->order_number }}

Customer Information

Name: {{ $order->user->name ?? 'N/A' }}

Email: {{ $order->user->email ?? 'N/A' }}

Phone: {{ $order->user->phone ?? 'N/A' }}

Order Information

Order Number: {{ $order->order_number }}

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

Status: {{ ucfirst($order->status) }}

Payment Status: {{ ucfirst($order->payment_status) }}

Shipping Address

@if ($order->shipping_address)

{{ $order->shipping_address['name'] ?? trim(($order->shipping_address['first_name'] ?? '') . ' ' . ($order->shipping_address['last_name'] ?? '')) }}

{{ $order->shipping_address['address'] ?? '' }}

{{ $order->shipping_address['city'] ?? '' }}

{{ $order->shipping_address['country'] ?? '' }}

Phone: {{ $order->shipping_address['phone'] ?? '' }}

@else

No shipping address available.

@endif

Billing Address

@if ($order->billing_address)

{{ $order->billing_address['name'] ?? trim(($order->billing_address['first_name'] ?? '') . ' ' . ($order->billing_address['last_name'] ?? '')) }}

{{ $order->billing_address['address'] ?? '' }}

{{ $order->billing_address['city'] ?? '' }}

{{ $order->billing_address['country'] ?? '' }}

Phone: {{ $order->billing_address['phone'] ?? '' }}

@else

No billing address available.

@endif
@if ($order->notes)

Order Notes

{{ $order->notes }}

@endif

Order Items

@forelse($order->orderItems as $item) @empty @endforelse
Product Price Quantity Total
{{ $item->product->name ?? 'N/A' }}
@if ($item->color)
Color: {{ $item->color }}
@endif @if ($item->size)
Size: {{ $item->size }}
@endif
৳{{ number_format($item->price, 2) }} {{ $item->quantity }} ৳{{ number_format($item->total, 2) }}
No items in this order.
Subtotal ৳{{ number_format($order->subtotal, 2) }}
Delivery Charge ৳{{ number_format($order->shipping, 2) }}
Total ৳{{ number_format($order->total, 2) }}

Update Order Status

@csrf @method('PUT')
@endsection