@extends('admin.layouts.app') @section('title', 'Order Details - ' . $order->order_number) @section('header', 'Order Details') @section('content')

{{ $order->order_number }}

Created on {{ $order->created_at->format('d M Y, H:i') }}

@if ($order->order_status === 'pending')
@csrf @method('PATCH')
@endif @if ($order->canBeCancelled())
@csrf @method('PATCH')
@endif @if (in_array($order->order_status, ['pending', 'confirmed'])) Edit Order @endif Back to Orders

Order Status

Current Status: @php $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'confirmed' => 'bg-blue-100 text-blue-800', 'processing' => 'bg-purple-100 text-purple-800', 'shipped' => 'bg-indigo-100 text-indigo-800', 'success' => 'bg-green-100 text-green-800', 'completed' => 'bg-green-100 text-green-800', 'cancelled' => 'bg-red-100 text-red-800', ]; @endphp {{ ucfirst($order->order_status) }}
@csrf @method('PATCH')

Payment Status

Payment Status: @php $paymentColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'paid' => 'bg-green-100 text-green-800', 'failed' => 'bg-red-100 text-red-800', 'refunded' => 'bg-purple-100 text-purple-800', 'cancelled' => 'bg-red-100 text-red-800', ]; @endphp {{ ucfirst($order->payment_status) }}
@csrf @method('PATCH')

Order Items

@foreach ($order->orderItems as $item) @endforeach
Product Quantity Unit Price Weight Total
{{ $item->product->name ?? 'Product not found' }}
@if ($item->special_instructions)
Special: {{ $item->special_instructions }}
@endif
{{ $item->quantity }} Rp {{ number_format($item->unit_price, 0, ',', '.') }} {{ number_format($item->total_weight, 2) }} kg Rp {{ number_format($item->total_price, 0, ',', '.') }}
Subtotal: Rp {{ number_format($order->subtotal, 0, ',', '.') }}
Total Weight: {{ number_format($order->total_weight, 2) }} kg
Total Amount: Rp {{ number_format($order->total_amount, 0, ',', '.') }}

Customer Information

{{ $order->customer_name }}

{{ $order->customer_phone }}

@if ($order->customer_email)

{{ $order->customer_email }}

@endif

{{ $order->customer_address }}

Order Summary

Order Date: {{ $order->order_date->format('d M Y') }}
Payment Method: {{ ucfirst($order->payment_method) }}
Total Items: {{ $order->total_items }}
Total Weight: {{ number_format($order->total_weight, 2) }} kg

Total Amount: Rp {{ number_format($order->total_amount, 0, ',', '.') }}
@if ($order->notes)

{{ $order->notes }}

@endif
@endsection