@extends('layout.app') @section('content') @php($r = $reservation)

Booking {{ $r->reference }} {{ $r->status->label() }}

Back to reservations

Stay

{{ $r->property->property_name }}

{{ $r->check_in->format('D, d M Y') }} → {{ $r->check_out->format('D, d M Y') }} ({{ $r->nights }} night{{ $r->nights > 1 ? 's' : '' }})

Payment: {{ $r->payment_method->label() }} · {{ ucfirst(str_replace('_', ' ', $r->payment_status)) }}

Source: {{ $r->source === 'owner' ? 'Entered by property' : 'Website' }} · Booked {{ $r->created_at->timezone(config('bedspace.timezone'))->format('Y-m-d H:i') }}

Cancellation policy: {{ $r->free_cancellation_until ? 'free until '.$r->free_cancellation_until->format('Y-m-d').' ('.$r->cancellation_days.' days)' : 'non-refundable' }}

@if($r->cancelled_at)

Cancelled {{ $r->cancelled_at->timezone(config('bedspace.timezone'))->format('Y-m-d H:i') }}: {{ $r->cancellation_reason }}

@if((float) $r->refund_due > 0)

Refund due: {{ $r->money($r->refund_due) }} ({{ $r->refund_status }})

@endif @endif

Guest

{{ $r->guest_name }} @if($previousStays > 0)Returning guest · {{ $previousStays }} other booking(s)@endif

{{ $r->guest_email }} · {{ $r->guest_phone }}

@if($r->guest_address)

{{ $r->guest_address }}@if($r->guest_country), {{ $r->guest_country }}@endif

@endif @if($r->special_requests)

Requests: {{ $r->special_requests }}

@endif

Rooms & price

@foreach($r->rooms as $line) @foreach($line->discounts as $discount) @endforeach @endforeach
Room typeGuests / mealsRoomsRoom numbersAmount
{{ $line->roomType->roomType }} {{ $line->occupancy->occupancy_name }}, {{ $line->mealType->mealType }} {{ $line->rooms }} {{ $line->activeAssignments->map(fn ($a) => $a->room->room_number)->join(', ') ?: 'โ€“' }} {{ $r->money($line->subtotal) }}
Discount: {{ $discount->description }}− {{ $r->money($discount->amount) }}
Total{{ $r->money($r->total) }}

Payments {{ ucfirst(str_replace('_', ' ', $r->payment_status)) }}

Paid {{ $r->money($r->amount_paid) }} of {{ $r->money($r->total) }} · Outstanding {{ $r->money($r->outstanding()) }} · Platform commission {{ number_format($r->commission_rate, 2) }}%

@if($r->payments->isNotEmpty()) @foreach($r->payments as $payment) @endforeach
DateMethodStatusAmountCommissionReferenceBy
{{ ($payment->paid_at ?? $payment->created_at)->timezone(config('bedspace.timezone'))->format('Y-m-d H:i') }} {{ $payment->isRefund() ? "Refund ยท " : "" }}{{ $payment->method->label() }} {{ ucfirst($payment->status) }} {{ $r->money($payment->amount) }} {{ $payment->commission_amount !== null ? $r->money($payment->commission_amount) : 'โ€“' }} {{ $payment->gateway_reference ?? $payment->reference }}@if($payment->notes)
{{ $payment->notes }}@endif
{{ $payment->recordedBy?->name ?? ($payment->gateway ? 'Gateway' : '') }}
@endif @if($r->refund_status === 'due')
Refund due: {{ $r->money($r->refundRemaining()) }} (cancelled within the free-cancellation period) @if((float) $r->amount_refunded > 0) · already refunded {{ $r->money($r->amount_refunded) }} @endif
@foreach(['platform' => 'Online payment (held by EpickTours)', 'property' => 'Paid at the hotel'] as $collector => $label) @php($refundable = min($heldBy[$collector], $r->refundRemaining())) @continue($refundable <= 0) @if($collector === 'platform' && !auth()->user()->isAdmin())

{{ $label }}: {{ $r->money($refundable) }} will be refunded to the guest's card by EpickTours.

@continue @endif @if($collector === 'property' && !$canManage) @continue @endif
@csrf
@if($collector === 'property')
@endif
@endforeach @elseif($r->refund_status === 'refunded')

Refunded {{ $r->money($r->amount_refunded) }} to the guest.

@endif @if($canManage && $r->outstanding() > 0 && !in_array($r->status, [\App\Enums\ReservationStatus::Cancelled, \App\Enums\ReservationStatus::Expired, \App\Enums\ReservationStatus::Pending]))
@csrf
The full outstanding amount marks the booking as paid. @endif
@if($canManage)

Actions

@if($r->status === \App\Enums\ReservationStatus::Confirmed)
@csrf
Check in
@if($r->check_in->toDateString() > $today)

Check-in opens on {{ $r->check_in->format('Y-m-d') }}.

@else @foreach($r->rooms as $line)
@if($freeRooms[$line->id]->isEmpty()) No free room numbers for this room type. Add them on the Room numbers page. @else Hold Ctrl (Cmd on Mac) to select several. @endif
@endforeach @endif
@endif
@foreach($r->status->allowedTransitions() as $to) @continue($to === \App\Enums\ReservationStatus::CheckedIn || $to === \App\Enums\ReservationStatus::Expired)
@csrf @if($to === \App\Enums\ReservationStatus::Cancelled) @endif
@endforeach
@endif

History

@foreach($r->statusHistory as $entry) @endforeach
WhenChangeByNote
{{ $entry->created_at?->timezone(config('bedspace.timezone'))->format('Y-m-d H:i') }} {{ $entry->from_status ? $entry->from_status->label().' โ†’ ' : '' }}{{ $entry->to_status->label() }} {{ $entry->user?->name ?? ($entry->user_id ? '' : 'Guest / system') }} {{ $entry->note }}
@stop