@push('title') Order Details @endpush @push('styles') @endpush
@if (session('success')) @endif
@can('view_order_management')

Order #{{ str_pad($order->id, 6, '0', STR_PAD_LEFT) }}

Customer Information
Name: {{ $order->customerInfo->first_name }} {{ $order->customerInfo->last_name }}
@if ($order->customerInfo->phone)
Phone: {{ $order->customerInfo->phone }}
@endif @if ($order->customerInfo->user && $order->customerInfo->user->email)
Email: {{ $order->customerInfo->user->email }}
@endif Shipping Address: @if ($order->customerInfo->address) {!! nl2br(e($order->customerInfo->address)) !!}
{!! nl2br(e($order->customerInfo->city)) !!}
{!! nl2br(e($order->customerInfo->state)) !!}
{!! nl2br(e($order->customerInfo->country)) !!}
{!! nl2br(e($order->customerInfo->zip)) !!} @else Not specified @endif
Order Information
Order Date: {{ $order->created_at->format('d M Y, h:i A') }}
Status: @if ($order->order_status == 'delivered') Delivered @elseif ($order->order_status == 'shipped') Shipped @elseif ($order->order_status == 'pending') Processing @elseif ($order->order_status == 'cancelled') Cancelled @else {{ ucfirst($order->order_status) }} @endif
Payment Method: {{ ucwords(str_replace('_', ' ', $order->payment_option)) }}
Total Amount: {{ number_format($order->total_amount, 2) }} {{ $config->currancy }}
Order Timeline
Order Placed: {{ $order->created_at->format('d M Y, h:i A') }}
Last Updated: {{ $order->updated_at->format('d M Y, h:i A') }}
Current Status: {{ ucfirst($order->order_status) }}
Order Summary
@php $subtotal = $order->orderItems->sum(function ($item) { return $item->total ?? $item->quantity * $item->price; }); $itemCount = $order->orderItems->sum('quantity'); @endphp
Total Items: {{ $itemCount }}
Subtotal: {{ number_format($subtotal, 2) }} {{ $config->currancy }}
Final Total: {{ number_format($order->total_amount, 2) }} {{ $config->currancy }}
Order Items
@foreach ($order->orderItems as $index => $item) @endforeach
# Product Name Quantity Unit Price Total
{{ $index + 1 }} {{ $item->product->name ?? 'Product Unavailable' }} @if ($item->product && $item->product->sku)
SKU: {{ $item->product->sku }} @endif
{{ $item->quantity }} {{ number_format($item->price, 2) }} {{ $config->currancy }} {{ number_format($item->total ?? $item->quantity * $item->price, 2) }} {{ $config->currancy }}
Grand Total: {{ number_format($order->total_amount, 2) }} {{ $config->currancy }}
Update Order & Payment Status
@csrf
@if (count($orderLog) > 0)
Order History
    @foreach ($orderLog as $log)
  • {{ $log->created_at->format('d M Y, h:i A') }}: {{ $log->status }} by {{ $log->user->name ?? 'System' }}
  • @endforeach
@endif
@endcan