@extends('backend.partials.master') @section('title') {{ ___('label.hotel_bookings') }} @endsection @section('maincontent') {{-- Book a stay: same rows the mobile app writes; the desk confirms and the billing observer raises the invoice from there. --}}
{{ ___('label.book_a_stay') }}
@csrf
@error('hotel_id') {{ $message }} @enderror
@error('hotel_room_id') {{ $message }} @enderror
@error('check_in') {{ $message }} @enderror
@error('check_out') {{ $message }} @enderror
@forelse($bookings as $b) @php $c = match($b->status) { 'Paid' => 'success', 'Confirmed' => 'info', 'Cancelled' => 'danger', default => 'warning', }; $payable = ! in_array($b->status, ['Paid', 'Cancelled'], true) && (float) $b->amount > 0; @endphp {{ $b->booking_no }} {{ $b->hotel?->name ?? '—' }} {{ $b->hotelRoom?->room_type ?? '—' }} {{ $b->check_in?->translatedFormat('d M Y') }} {{ $b->check_out?->translatedFormat('d M Y') }} {{ $b->nights }} {{ currency_symbol() }}{{ number_format($b->amount, 2) }} {{ admin_label($b->status) }} @if($b->payment_claimed_at)
{{ ___('label.payment_claimed_awaiting') }} @endif @if($payable) @else — @endif @empty {{ ___('label.no_hotel_bookings_yet') }} @endforelse
@foreach($bookings as $b) @if(! in_array($b->status, ['Paid', 'Cancelled'], true) && (float) $b->amount > 0) @endif @endforeach
@endsection @push('scripts') {{-- Same hotel→room filter the back-office booking form uses (matches on #hotel_id / #hotel_room_id and each option's data-hotel-id). --}} @endpush