{{ $order->order_number }}

{{ __('Placed on :date', ['date' => $order->created_at->format('M d, Y')]) }}

{{ $order->adminStatusLabel() }} {{ __('Back to orders') }}
@if (session('status'))
{{ session('status') }}
@endif

{{ __('Products') }}

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

{{ $item->product_name }}

{{ __('Qty: :qty at ৳:price', ['qty' => $item->quantity, 'price' => number_format($item->unit_price)]) }}

৳{{ number_format($item->subtotal) }}

@endforeach

{{ __('Customer') }}

{{ __('Name') }}
{{ $order->customer_name }}
{{ __('Phone') }}
{{ $order->customer_phone }}
{{ __('Delivery address') }}
{{ $order->deliveryAddress() }}
@if ($order->division_name || $order->district_name || $order->upazila_name || $order->union_name)
{{ __('Division') }}
{{ $order->division_name ?? '—' }}
{{ __('District') }}
{{ $order->district_name ?? '—' }}
{{ __('Upazila') }}
{{ $order->upazila_name ?? '—' }}
{{ __('Union') }}
{{ $order->union_name ?? '—' }}
@endif

{{ __('Courier') }}

{{ __('Delivery status') }}
{{ $order->courierStatusLabel() }}
@if ($order->invoice)
{{ __('Invoice') }}
{{ $order->invoice }}
@endif @if ($order->consignment_id)
{{ __('Consignment ID') }}
{{ $order->consignment_id }}
@endif @if ($order->courierTrackingCode())
{{ __('Tracking code') }}
{{ $order->courierTrackingCode() }}
@endif @if ($order->courierTrackingUrl())
{{ __('Tracking link') }}
{{ __('Open tracking') }}
@endif @if ($order->formattedCourierDeliveryCharge())
{{ __('Courier charge') }}
{{ $order->formattedCourierDeliveryCharge() }}
@endif @if ($order->courierTrackingMessage())
{{ __('Last update') }}
{{ $order->courierTrackingMessage() }}
@endif @if ($order->courierLastUpdated())
{{ __('Updated at') }}
{{ $order->courierLastUpdated()->format('M d, Y h:i A') }}
@endif

{{ __('Manage order') }}

@csrf @method('PATCH')
@if ($order->canBeCancelled())
@csrf @method('PATCH')
@endif

{{ __('Order summary') }}

{{ __('Status') }}
{{ $order->adminStatusLabel() }}
{{ __('Subtotal') }}
{{ $order->formattedSubtotal() }}
{{ __('Delivery') }}
{{ $order->formattedDeliveryFee() }}
{{ __('Total') }}
{{ $order->formattedTotal() }}