@extends('admin.layouts.app') @section('page-title', 'Order Details') @section('content')
{{-- HEADER --}}
{{-- TOP BAR --}}

Order Details

@php $status = strtolower($order->status ?? ''); @endphp Detailed view of this shipment order
{{-- ADD ITEM --}} @can('order.create') @if($status === 'pending') @endif @endcan
{{-- Edit Order --}} @if($status === 'pending') @endif {{-- Delete Order --}} @if($status === 'pending')
@csrf @method('DELETE')
@endif

{{-- EDIT ORDER FORM --}} {{-- CUSTOMER INFO --}}
{{ strtoupper(substr($user->customer_name ?? 'U', 0, 1)) }}
{{ $user->customer_name ?? 'Unknown Customer' }}

{{ $user->company_name ?? 'N/A' }}

{{ $user->email ?? '' }}

{{ $user->mobile_no ?? '' }}

{{ $user->address ?? '' }}

{{ $user->pincode ?? '' }}
{{-- ORDER SUMMARY --}}

Order ID

{{ $order->order_id }}

Mark No

{{ $order->mark_no }}

Total Items

{{ $order->items->count() }}

Status

{{ ucfirst($order->status) }}
{{-- ORIGIN / DESTINATION --}}

Origin

{{ $order->origin }}

Destination

{{ $order->destination }}
{{-- ITEMS TABLE --}}
@foreach($order->items as $index => $item) @endforeach
# Description CTN QTY TTL/QTY Unit Price Total Amount CBM TTL CBM KG TTL KG Shop No Actions
{{ $index + 1 }} {{ $item->description }} {{ $item->ctn }} {{ $item->qty }} {{ $item->ttl_qty }} {{ $item->unit }} {{ number_format($item->price, 2) }} {{ number_format($item->ttl_amount, 2) }} {{ $item->cbm }} {{ $item->ttl_cbm }} {{ $item->kg }} {{ $item->ttl_kg }} {{ $item->shop_no }} @if($status === 'pending') {{-- EDIT BUTTON --}} @can('order.edit') @endcan {{-- DELETE BUTTON --}} @can('order.delete')
@csrf @method('DELETE')
@endcan @endif
@foreach($order->items as $item) @endforeach {{-- TOTALS --}}
{{ $order->ctn }}
Total CTN
{{ $order->qty }}
Total QTY
{{ $order->ttl_kg }}
Total KG
₹{{ number_format($order->ttl_amount, 2) }}
Total Amount
{{-- ADD ITEM MODAL --}} {{-- AUTO-FILL SCRIPT --}} @endsection