@extends('layouts.admin') @section('title', $booking->booking_no) @push('styles') @endpush @section('content') @include('admin.resorts.errors') @use('App\Services\Resort\ResortPresenter') @php $canDo = fn ($route) => auth()->user()->hasRole('super-admin') || auth()->user()->hasPermission($route); $label = fn ($status) => ucwords(strtolower(str_replace('_', ' ', $status))); $nextStatuses = \App\Services\Resort\ResortBookingStatusService::TRANSITIONS[$booking->status] ?? []; $due = max(0, $booking->grand_total - $booking->paid); $payable = in_array($booking->status, \App\Services\Resort\ResortPaymentService::PAYABLE) && $due > 0 && $canDo('admin.resort-bookings.payment'); $refundable = $booking->paid - $booking->refunded > 0 && $canDo('admin.resort-bookings.refund'); $editable = in_array($booking->status, \App\Services\Resort\ResortBookingService::EDITABLE) && $canDo('admin.resort-bookings.edit'); $paidPercent = $booking->grand_total > 0 ? min(100, round($booking->paid * 100 / $booking->grand_total)) : 0; $money = fn ($value) => number_format((float) $value, 2); @endphp
Special request: {{ $booking->special_request }}
@endif @if($booking->admin_note)Admin note: {{ $booking->admin_note }}
@endif @if($booking->cancelled_at)Cancelled {{ $booking->cancelled_at->format('d M Y, h:i A') }}: {{ $booking->cancellation_reason }}
@endif| Night | Unit rate | Extras | Total | @if($costAccess)Unit cost | @endif
|---|---|---|---|---|
| {{ $night['date'] }} | {{ $night['selling_price'] }} | {{ $night['extras'] }} | {{ $night['total'] }} | @if($costAccess){{ $night['cost_price'] }} | @endif
No further status changes apply to this booking.
@endifNo active offline payment method is set up, so a receipt cannot be recorded yet.
@else @endif @endif @if($refundable)| Date | Type | Method | Receipt reference | Amount | Status | Recorded by | |
|---|---|---|---|---|---|---|---|
| {{ ($payment->paid_at ?? $payment->created_at)->format('d M Y') }} | {{ $isRefund ? 'Refund' : 'Payment' }} | {{ $payment->paymentMethod?->name ?? ($offline ? '—' : ucfirst($payment->gateway)) }} | {{ $payment->meta['reference'] ?? $payment->gateway_transaction_id }}@if(!empty($payment->meta['note']))@endif @if($voided && !empty($payment->meta['void_reason']))@endif | {{ $isRefund ? '−' : '' }}{{ $money($payment->amount) }} | {{ $voided ? 'voided' : $payment->status }} | {{ $recorder ? ($actors[$recorder] ?? 'User #'.$recorder) : ($offline ? '—' : 'Online') }} | @if($canEdit)@endif @if($canVoid)@endif |
| No payments recorded yet. | |||||||
| {{ $change['field'] }} | {{ $change['from'] ?? '—' }} {{ $change['to'] ?? '—' }} |
{{ $entry['raw'] }}