{{-- resources/views/admin/warehouse-orders/show.blade.php --}} @extends('admin.layouts.base') @section('title', 'Order Details - ' . $order->order_reference) @section('content')

Space Order Details

#{{ $order->order_reference }} {{ $order->order_status->label() }} @if ($order->rental_start_date && $order->rental_end_date) {{ $order->rental_start_date->format('M d, Y') }} → {{ $order->rental_end_date->format('M d, Y') }} @else Dates not set @endif
Back to Orders

Order Information

{{ $order->customer_name }}
{{ $order->customer_email }}
@if ($order->customer_phone)
{{ $order->customer_phone }}
@endif
{{ $order->warehouse->name }}
{{ $order->warehouse->city }}, {{ $order->warehouse->zone ?? 'N/A' }}
{{ $order->rental_start_date ? $order->rental_start_date->format('M d, Y') : 'Not set' }}
{{ $order->rental_end_date ? $order->rental_end_date->format('M d, Y') : 'Not set' }}
{{ $order->getDurationInDays() }} days
{{ ucfirst($order->input_type) }}
{{ number_format($order->calculated_sqft, 2) }} sqft
{{ number_format($order->total_sqft, 2) }} sqft
+ {{ number_format($order->activity_space_sqft, 2) }} activity space

Space Details ({{ ucfirst($order->input_type) }})

@if ($order->input_type === 'pallet')
Pallet Count
{{ $order->pallet_count }}
Length
{{ $order->pallet_length }}"
Width
{{ $order->pallet_width }}"
@else
Cartons
{{ $order->carton_count }}
L
{{ $order->carton_length }}"
W
{{ $order->carton_width }}"
H
{{ $order->carton_height }}"
@endif
@if ($order->pricing_breakdown && isset($order->pricing_breakdown['hidden_from_customer']))

Detailed Pricing Breakdown (Admin Only)

@php $breakdown = $order->pricing_breakdown; $sqftDetails = $breakdown['sqft_details'] ?? []; $laborDetails = $breakdown['labor_details'] ?? []; $equipmentDetails = $breakdown['equipment_details'] ?? []; $pricingSummary = $breakdown['pricing_summary'] ?? []; @endphp @if (!empty($sqftDetails))
Space Calculation
Base SQFT
{{ number_format($sqftDetails['base_sqft'] ?? 0, 2) }}
Activity SQFT
{{ number_format($sqftDetails['activity_sqft'] ?? 0, 2) }}
Total SQFT
{{ number_format($sqftDetails['total_sqft'] ?? 0, 2) }}
@endif @if (!empty($laborDetails['breakdown']))
Labor Services
@foreach ($laborDetails['breakdown'] as $labor) @endforeach
Type Hours Workers Rate Total
Labor Type #{{ $labor['labor_type_id'] }} {{ $labor['hours'] ?? 'N/A' }} {{ $labor['workers'] ?? 1 }} ${{ number_format($labor['rate'], 2) }} ${{ number_format($labor['fee'], 2) }}
Total Labor Fee ${{ number_format($laborDetails['total_fee'] ?? 0, 2) }}
@endif @if (!empty($equipmentDetails['breakdown']))
Equipment Rental
@foreach ($equipmentDetails['breakdown'] as $equipment) @endforeach
Type Charge Type Qty Usage Rate Total
Equipment #{{ $equipment['equipment_type_id'] }} {{ ucfirst($equipment['charge_type']) }} {{ $equipment['quantity'] }} {{ $equipment['usage_time'] ?? 'N/A' }} ${{ number_format($equipment['rate'], 2) }} ${{ number_format($equipment['fee'], 2) }}
Total Equipment Fee ${{ number_format($equipmentDetails['total_fee'] ?? 0, 2) }}
@endif
@endif

Update Order Status

@csrf

Update Payment Status

@csrf
@if (isset($availability))

Warehouse Space Status

{{ number_format($availability['max_capacity']) }} sqft
{{ number_format($availability['used_space']) }} sqft
{{ number_format($availability['available_space']) }} sqft
@php $percent = $availability['max_capacity'] > 0 ? ($availability['used_space'] / $availability['max_capacity']) * 100 : 0; $barClass = $percent > 90 ? 'danger' : ($percent > 70 ? 'warning' : 'success'); @endphp
{{ number_format($percent, 1) }}% Utilized
@if (isset($availability['breakdown']))
Breakdown:
Confirmed Bookings: {{ number_format($availability['breakdown']['confirmed_bookings'] ?? 0) }} sqft
Confirmed Orders: {{ number_format($availability['breakdown']['confirmed_orders'] ?? 0) }} sqft
Pending Reservations: {{ number_format(($availability['breakdown']['pending_booking_reservations'] ?? 0) + ($availability['breakdown']['pending_order_reservations'] ?? 0)) }} sqft
@endif
@endif

Pricing Summary

Space Fee ${{ number_format($order->space_fee, 2) }}
Labor Fee ${{ number_format($order->labor_fee, 2) }}
Equipment Fee ${{ number_format($order->equipment_fee, 2) }}

Subtotal ${{ number_format($order->space_fee + $order->labor_fee + $order->equipment_fee, 2) }}
Markup ${{ number_format($order->markup_amount, 2) }}

Final Amount ${{ number_format($order->final_price, 2) }}
Currency: {{ $order->currency }}
@if ($order->customer_notes || $order->admin_notes)

Notes

@if ($order->customer_notes)

{{ $order->customer_notes }}

@endif @if ($order->admin_notes)

{!! nl2br(e($order->admin_notes)) !!}

@endif
@endif
@endsection