@extends('admin.layout.app') @section('title', 'Order Details') @section('page-title', 'Order Details') @section('content')

Order Details

Back to Orders
@if (session('success')) @endif
Order Information
Order Number:
{{ $order->order_number }}
Invoice Number:
{{ $order->invoice_number }}
Order Date:
{{ $order->created_at->format('d M Y, h:i A') }}
Payment Method:
{{ ucfirst($order->payment_method ?? 'N/A') }}
Transaction ID:
{{ $order->transaction_id ?? 'N/A' }}
Order Items
@foreach($order->orderItems as $item) @php $itemProduct = $item->product; $itemVendor = $item->vendorProduct; $itemName = $itemProduct->product_name ?? $itemVendor->product_name ?? 'N/A'; $itemSku = $itemProduct->sku ?? $itemVendor->sku ?? 'N/A'; @endphp @endforeach
Product Price Quantity Total
{{ $itemName }}
SKU: {{ $itemSku }}
₹{{ number_format($item->price, 2) }} {{ $item->quantity }} ₹{{ number_format($item->total, 2) }}
@if($order->shippingAddress)
Shipping Address
{{ $order->shippingAddress->name ?? 'N/A' }}
{{ $order->shippingAddress->address_line1 ?? '' }}
@if($order->shippingAddress->address_line2) {{ $order->shippingAddress->address_line2 }}
@endif {{ $order->shippingAddress->city ?? '' }}, {{ $order->shippingAddress->state ?? '' }} - {{ $order->shippingAddress->pincode ?? '' }}
Phone: {{ $order->shippingAddress->phone ?? 'N/A' }}
@endif
Order Summary
@if($order->gst_amount > 0) @endif @if($order->product_discount > 0) @endif @if($order->coupon_discount > 0) @endif
Subtotal: ₹{{ number_format($order->orderItems->sum(function($item) { return $item->price * $item->quantity; }), 2) }}
GST: ₹{{ number_format($order->gst_amount, 2) }}
Product Discount: -₹{{ number_format($order->product_discount, 2) }}
Coupon Discount ({{ $order->coupon_code ?? '' }}): -₹{{ number_format($order->coupon_discount, 2) }}
Total Amount: ₹{{ number_format($order->total_amount, 2) }}
Update Status
@csrf
Current Status
Order Status:
@php $statusColors = [ 'pending' => 'warning', 'confirmed' => 'info', 'processing' => 'primary', 'shipped' => 'success', 'delivered' => 'success', 'cancelled' => 'danger' ]; $color = $statusColors[$order->order_status] ?? 'secondary'; @endphp {{ ucfirst($order->order_status) }}
@endsection