{{-- ── Header ── --}}

{{ __('hotel::modules.stays.title') }}

@foreach($statuses as $status) @endforeach
{{-- ── Table ── --}}
@forelse ($stays as $stay) @php $primaryStayGuest = $stay->stayGuests->firstWhere('is_primary', true) ?? $stay->stayGuests->first(); $primaryGuest = $primaryStayGuest?->guest; $totalGuests = $stay->adults + $stay->children; $balance = $stay->folio?->balance ?? 0; $statusColor = match($stay->status) { \Modules\Hotel\Enums\StayStatus::CHECKED_IN => 'bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400', \Modules\Hotel\Enums\StayStatus::CHECKED_OUT => 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300', \Modules\Hotel\Enums\StayStatus::EXTENDED => 'bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400', default => 'bg-gray-100 text-gray-500', }; @endphp {{-- Stay Number --}} {{-- Room --}} {{-- Primary Guest --}} {{-- Check-in --}} {{-- Check-out --}} {{-- Guests --}} {{-- Balance --}} {{-- Status --}} {{-- Action --}} @empty @endforelse
{{ __('hotel::modules.stays.stayNumber') }} {{ __('hotel::modules.stays.room') }} {{ __('hotel::modules.stays.primaryGuest') }} {{ __('hotel::modules.stays.checkIn') }} {{ __('hotel::modules.stays.checkOut') }} {{ __('hotel::modules.stays.guests') }} {{ __('hotel::modules.stays.balance') }} {{ __('hotel::modules.stays.status') }} {{ __('hotel::modules.stays.action') }}
{{ $stay->stay_number }} @if(!$stay->reservation_id) Walk-in @endif
{{ $stay->room?->room_number ?? '—' }}
{{ $stay->room?->roomType?->name ?? '' }}
@if($primaryGuest)
{{ $primaryGuest->full_name }}
{{ $primaryGuest->phone ?? '—' }}
@else @endif
{{ $stay->check_in_at->format('M d, Y') }}
{{ $stay->check_in_at->format('g:i A') }}
@if($stay->actual_checkout_at)
{{ $stay->actual_checkout_at->format('M d, Y') }}
{{ $stay->actual_checkout_at->format('g:i A') }}
@else
Exp: {{ $stay->expected_checkout_at->format('M d, Y') }}
{{ $stay->expected_checkout_at->format('g:i A') }}
@endif
{{ $stay->adults }} A @if($stay->children > 0)  · {{ $stay->children }} C @endif @if($balance > 0) {{ number_format($balance, 2) }} @else Settled @endif {{ $stay->status->label() }}

{{ __('hotel::modules.stays.noStaysFound') }}

{{ $stays->links() }}
{{-- ── View Stay Modal ── --}} @if($selectedStay)
{{ $selectedStay->stay_number }} @php $mColor = match($selectedStay->status) { \Modules\Hotel\Enums\StayStatus::CHECKED_IN => 'bg-emerald-100 text-emerald-700', \Modules\Hotel\Enums\StayStatus::CHECKED_OUT => 'bg-gray-100 text-gray-600', \Modules\Hotel\Enums\StayStatus::EXTENDED => 'bg-blue-100 text-blue-700', default => 'bg-gray-100 text-gray-500', }; @endphp {{ $selectedStay->status->label() }}
{{-- ── Room Info ── --}}
{{ __('hotel::modules.stays.roomDetails') }} @if(!$selectedStay->reservation_id) Walk-in @else Res: {{ $selectedStay->reservation?->reservation_number }} @endif

{{ __('hotel::modules.stays.room') }}

{{ $selectedStay->room?->room_number ?? '—' }}

{{ __('hotel::modules.stays.roomType') }}

{{ $selectedStay->room?->roomType?->name ?? '—' }}

{{ __('hotel::modules.stays.checkIn') }}

{{ $selectedStay->check_in_at->format('M d, Y · g:i A') }}

{{ $selectedStay->actual_checkout_at ? __('hotel::modules.stays.actualCheckOut') : __('hotel::modules.stays.expectedCheckOut') }}

{{ ($selectedStay->actual_checkout_at ?? $selectedStay->expected_checkout_at)->format('M d, Y · g:i A') }}

{{ __('hotel::modules.stays.adults') }}

{{ $selectedStay->adults }}

{{ __('hotel::modules.stays.children') }}

{{ $selectedStay->children }}

@if($selectedStay->check_in_notes)

{{ __('hotel::modules.stays.checkInNotes') }}

{{ $selectedStay->check_in_notes }}

@endif @if($selectedStay->check_out_notes)

{{ __('hotel::modules.stays.checkOutNotes') }}

{{ $selectedStay->check_out_notes }}

@endif
{{-- ── Guests ── --}}

{{ __('hotel::modules.stays.guestDetails') }}

@forelse($selectedStay->stayGuests as $stayGuest) @php $g = $stayGuest->guest; @endphp
{{ $loop->iteration }} {{ $g?->full_name ?? '—' }} @if($stayGuest->is_primary) {{ __('hotel::modules.checkIn.primaryBadge') }} @endif
@if($g)

{{ __('hotel::modules.guest.phone') }}

{{ $g->phone ?: '—' }}

{{ __('hotel::modules.guest.email') }}

{{ $g->email ?: '—' }}

{{ __('hotel::modules.guest.idType') }}

{{ $g->id_type ? ucwords(str_replace('_', ' ', $g->id_type)) : '—' }}

{{ __('hotel::modules.guest.idNumber') }}

{{ $g->id_number ?: '—' }}

@endif
@empty

{{ __('hotel::modules.stays.noGuests') }}

@endforelse
{{-- ── Folio Summary ── --}} @if($selectedStay->folio) @php $folio = $selectedStay->folio; @endphp

{{ __('hotel::modules.stays.folioSummary') }}

{{-- Totals card --}}

{{ __('hotel::modules.stays.totalCharges') }}

{{ number_format($folio->total_charges, 2) }}

{{ __('hotel::modules.stays.totalPaid') }}

{{ number_format($folio->total_payments, 2) }}

{{ __('hotel::modules.stays.balance') }}

{{ number_format($folio->balance, 2) }}

{{-- Folio Lines --}} @if($folio->folioLines->count())

{{ __('hotel::modules.stays.charges') }}

@foreach($folio->folioLines as $line)

{{ $line->description }}

{{ \Carbon\Carbon::parse($line->posting_date)->format('M d, Y') }} · {{ str_replace('_', ' ', $line->type->value) }}

{{ number_format($line->net_amount, 2) }}
@endforeach
@endif {{-- Payments --}} @if($folio->folioPayments->count())

{{ __('hotel::modules.stays.payments') }}

@foreach($folio->folioPayments as $payment)

{{ str_replace('_', ' ', $payment->payment_method) }}

@if($payment->transaction_reference)

Ref: {{ $payment->transaction_reference }}

@endif
{{ number_format($payment->amount, 2) }}
@endforeach
@endif
@endif {{-- ── Staff Info ── --}} @if($selectedStay->checkedInBy || $selectedStay->checkedOutBy)

{{ __('hotel::modules.stays.staffInfo') }}

@if($selectedStay->checkedInBy)

{{ __('hotel::modules.stays.checkedInBy') }}

{{ $selectedStay->checkedInBy->name }}

@endif @if($selectedStay->checkedOutBy)

{{ __('hotel::modules.stays.checkedOutBy') }}

{{ $selectedStay->checkedOutBy->name }}

@endif
@endif
{{ __('app.close') }}
@endif