@extends('admin.layouts.app') @section('title', 'Guest Folio') @section('page-title', 'Guest Folio - ' . $booking->booking_number) @section('content')

{{ $booking->guest_name }}

{{ $booking->booking_number }}

Print Receipt

Room

{{ $booking->room?->room_number ?? 'Not Assigned' }}

Check-in

{{ $booking->check_in_date->format('M d, Y') }}

Check-out

{{ $booking->check_out_date->format('M d, Y') }}

Nights

{{ $booking->nights }}

Guests

{{ $booking->adults + $booking->children }}

Charges

@if($booking->booking_status === 'checked_in') @endif
@forelse($charges ?? [] as $charge) @empty @endforelse
Description Type Amount
{{ $charge->description }} {{ $charge->charge_type }} ₦ {{ number_format($charge->amount, 0) }}
No charges yet
Total Charges ₦ {{ number_format($charges->sum('amount') ?? 0, 0) }}

Payments

@if($booking->booking_status === 'checked_in') @endif
@forelse($payments ?? [] as $payment) @empty @endforelse
Date Method Reference Amount
{{ $payment->created_at->format('M d, Y H:i') }} {{ $payment->payment_method }} {{ $payment->transaction_ref ?? '-' }} ₦ {{ number_format($payment->amount, 0) }}
No payments recorded
@php $roomCharges = $charges->where('charge_type', 'room')->sum('amount'); $otherCharges = $charges->where('charge_type', '!=', 'room')->sum('amount'); $totalCharges = $roomCharges + $otherCharges; $totalPayments = $payments->sum('amount') ?? 0; $balance = $totalCharges - $totalPayments; @endphp

Folio Summary

Room Charges ₦ {{ number_format($roomCharges, 0) }}
@if($otherCharges > 0)
Other Charges ₦ {{ number_format($otherCharges, 0) }}
@endif
Total Charges ₦ {{ number_format($totalCharges, 0) }}
Payments - ₦ {{ number_format($totalPayments, 0) }}
Balance ₦ {{ number_format($balance, 0) }}

Actions

@if($booking->booking_status === 'confirmed') Check In Guest @elseif($booking->booking_status === 'checked_in') Check Out Guest
@csrf
@endif
@endsection