@extends('layouts.admin') @section('content')

Order #{{ $order->order_number }}

Print Invoice @if(in_array($order->status, ['pending', 'processing'])) Edit Order @else Locked ({{ ucfirst($order->status) }}) @endif Back to Orders

Order Items

@foreach($order->items as $item)
{{ $item->product_name }}

{{ $item->product_name }}

Qty: {{ $item->quantity }} x ৳{{ number_format($item->price, 2) }}

৳{{ number_format($item->total, 2) }}
@endforeach
Subtotal: ৳{{ number_format($order->subtotal, 2) }}
@if($order->discount_amount > 0)
Discount: -৳{{ number_format($order->discount_amount, 2) }}
@endif
Shipping: ৳{{ number_format($order->shipping_charge, 2) }}
@if(($order->extra_charge ?? 0) > 0)
Extra Charges: +৳{{ number_format($order->extra_charge, 2) }}
@endif
Total: ৳{{ number_format($order->total, 2) }}
@php $isTerminal = in_array($order->status, ['shipped','delivered','cancelled']); @endphp @if($isTerminal) {{-- ── LOCKED STATE ── --}}

Status Locked

@php $badgeColors = [ 'shipped' => 'bg-blue-100 text-blue-700 border border-blue-200', 'delivered' => 'bg-green-100 text-green-700 border border-green-200', 'cancelled' => 'bg-red-100 text-red-700 border border-red-200', ]; $color = $badgeColors[$order->status] ?? 'bg-gray-100 text-gray-600'; @endphp
{{ ucfirst($order->status) }}

This order status is permanently locked and cannot be changed.

@else {{-- ── ACTIVE FORM ── --}}

Update Status

@csrf @method('PUT')
@endif

Customer Details

Name: {{ $order->shipping_name }}

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

Phone: {{ $order->shipping_phone }}

Payment Method: {{ $order->payment_method }} ({{ $order->payment_status }})

Shipping Address

{{ $order->shipping_address }}

{{ $order->shipping_city }}

@if($order->shipping_district)

{{ $order->shipping_district }}

@endif
@if($order->order_notes)

Order Notes:

{{ $order->order_notes }}

@endif
@endsection