@extends('adminlte::page') @section('title', 'Order Details - MobileSentrix Admin') @section('content_header')

Order Details: {{ $order->order_number }}

Back to Orders
@stop @section('content') @if(session('success'))
{{ session('success') }}
@endif

Order Information

Order Number: {{ $order->order_number }}
Customer: {{ $order->customer_name }}
Email: {{ $order->customer_email }}
Phone: {{ $order->customer_phone ?? 'N/A' }}
Order Date: {{ $order->created_at->format('M d, Y H:i A') }}
Payment Method: {{ $order->payment_method ?? 'N/A' }}
Status: @php $badgeClass = match($order->status) { 'completed' => 'badge-success', 'pending' => 'badge-warning', 'processing' => 'badge-info', 'cancelled' => 'badge-danger', 'refunded' => 'badge-secondary', default => 'badge-light', }; @endphp {{ ucfirst($order->status) }}
Notes: {{ $order->notes ?? 'No notes' }}

Order Items

@foreach($order->orderItems as $item) @endforeach
Product SKU Price Quantity Subtotal
{{ $item->product_name }} @if($item->product)
View Product @endif
{{ $item->product_sku }} ${{ number_format($item->price, 2) }} {{ $item->quantity }} ${{ number_format($item->subtotal, 2) }}
Subtotal: ${{ number_format($order->subtotal, 2) }}
Tax: ${{ number_format($order->tax, 2) }}
Shipping: ${{ number_format($order->shipping, 2) }}
Total: ${{ number_format($order->total, 2) }}

Shipping Address

@if($order->shipping_address)
{!! nl2br(e($order->shipping_address)) !!}
@else

No shipping address provided

@endif

Billing Address

@if($order->billing_address)
{!! nl2br(e($order->billing_address)) !!}
@else

No billing address provided

@endif

Update Order Status

@csrf

Order Summary

Items: {{ $order->orderItems->count() }}
Subtotal: ${{ number_format($order->subtotal, 2) }}
Tax: ${{ number_format($order->tax, 2) }}
Shipping: ${{ number_format($order->shipping, 2) }}
Total: ${{ number_format($order->total, 2) }}
@stop