@extends('admin.layout.template') @section('title', 'Order Details') @section('content')
{{-- ORDER HEADER --}}

#{{ $order->order_number }} {{ ucfirst($order->payment_status) }} {{ ucfirst($order->order_status) }}

Order / Order Details / {{ $order->created_at->format('M d, Y h:i a') }}

{{-- PRODUCTS --}}

Products

@foreach($order->items as $item) @endforeach
Product Status Qty Price Tax Total
@php $image = $item->product?->images->first()?->image; @endphp {{ $item->product->name }}

{{ $item->product->name }}

{{ ucfirst($item->status) }} {{ $item->qty }} ₹{{ number_format($item->price,2) }} ₹{{ number_format($item->tax,2) }} ₹{{ number_format($item->total,2) }}
{{-- ORDER TIMELINE --}}

Order Timeline

@php $lastStatusId = optional($order->statusHistory->last())->id; @endphp @foreach($order->statusHistory as $history)
{{-- ICON --}} @if($history->id == $lastStatusId) {{-- CURRENT STATUS (SPINNER) --}}
Loading...
@else {{-- COMPLETED STATUS --}} @endif
{{-- CONTENT --}}
{{ ucfirst($history->status) }}
@if($history->description)

{{ $history->description }}

@endif

{{ \Carbon\Carbon::parse($history->status_date)->format('M d, Y, h:i a') }}

@endforeach
{{-- ORDER SUMMARY --}}

Order Summary

Subtotal ₹{{ number_format($order->subtotal,2) }}
Discount -₹{{ number_format($order->discount,2) }}
Tax ₹{{ number_format($order->tax,2) }}
Delivery ₹{{ number_format($order->delivery_charge,2) }}
{{-- PAYMENT INFO (FROM ORDERS TABLE) --}}

Payment Information

Payment Method : {{ ucfirst($order->payment_method ?? 'N/A') }}

Transaction ID : {{ $order->transaction_id ?? 'N/A' }}

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

{{-- CUSTOMER DETAILS --}}

Customer

{{ $order->user->name }}

{{ $order->user->email }}

{{ $order->user->phone }}


Shipping Address

{{ $order->shipping_address }}

@endsection