@extends('layouts.dashboard') @section('title', 'Booking '.$booking->reference) @section('content') @php $__user = auth()->user(); @endphp

Booking {{ $booking->reference }}

@if ($booking->origin?->value === 'office') Phone booking @if ($booking->bookedByUser) · taken by {{ $booking->bookedByUser->name }} @endif @endif {{ str_replace('_', ' ', $booking->status->value) }}

Customer

{{ $booking->title }} {{ $booking->first_name }} {{ $booking->last_name }}

@if ($booking->company)

{{ $booking->company }}

@endif

{{ $booking->email }}

{{ $booking->mobile }} {{ $booking->landline ? '/ '.$booking->landline : '' }}

@if ($booking->customer)

View customer record

@endif

Address

{{ $booking->address }}

{{ $booking->suburb }} {{ $booking->postcode }}

@if ($booking->town)

{{ $booking->town->name }}

@endif

Distance: {{ $booking->distance_km !== null ? $booking->distance_km.' km' : '—' }} ({{ $booking->distance_method?->value ?? 'not calculated' }})

Dates

Delivery: {{ $booking->delivery_date?->format('Y-m-d') }}

Collection: {{ $booking->collection_date?->format('Y-m-d') }}

Delivery window: {{ $booking->delivery_window ?? '—' }}

Payment

Status: @if ($booking->paid_at) Paid {{ $booking->paid_at->format('Y-m-d') }} @elseif ($booking->pay_on_invoice) On invoice @elseif ($booking->status->value === 'awaiting_payment') Awaiting payment @else Not paid @endif

Total: {{ $booking->total_inc_gst !== null ? '$'.number_format($booking->total_inc_gst, 2) : '—' }} (ex GST {{ $booking->total_ex_gst !== null ? '$'.number_format($booking->total_ex_gst, 2) : '—' }}, GST {{ $booking->gst_amount !== null ? '$'.number_format($booking->gst_amount, 2) : '—' }})

@if ($booking->payment_method?->value === 'payment_link' && $booking->status->value === 'awaiting_payment')

Payment link sent

Sent {{ $booking->payment_link_sent_at?->format('Y-m-d H:i') }}. Bin is held until {{ $booking->paymentHoldDeadline()?->format('Y-m-d H:i') }} — unpaid after that, it reverts to draft and the dates release.

@endif

Bins

@if ($booking->bookingBins->isNotEmpty()) @foreach ($booking->bookingBins as $bookingBin) @endforeach
Size Bin Pre-purchased extra weight (kg)
{{ $bookingBin->binType?->name }} {{ $bookingBin->bin?->qr_token ?? 'Not yet assigned' }} {{ $bookingBin->pre_purchased_extra_weight_kg ?? 0 }}
@else

No bins recorded.

@endif

Price breakdown

@if ($booking->price_breakdown)
{{ json_encode($booking->price_breakdown, JSON_PRETTY_PRINT) }}
@else

No breakdown recorded — this booking predates or bypassed the pricing engine.

@endif

Dates & notes

Changing these dates does not re-price the booking.

@csrf @method('PUT')
@if ($__user?->isOwner() || $__user?->isSuperAdmin())

Adjust total

Manual override of the charged total — the price breakdown above stays as the engine calculated it.

@csrf @method('PUT')
@endif
@endsection