@php $restaurantBills = $restaurantBills ?? collect(); $folioTotal = $booking->total_amount + $restaurantBills->sum('total_amount'); $folioPaid = $booking->paid_amount + $restaurantBills->sum('paid_amount'); $folioBalance = $booking->balance_amount + $restaurantBills->sum('balance_amount'); @endphp

{{ $hotelName ?: 'Accommodation' }}

{{ $hotelAddress }}
{{ $hotelPhone }} {{ $hotelEmail ? '| '.$hotelEmail : '' }}
Guest
{{ $booking->guest_name }}
{{ $booking->guest_phone ?: '-' }}
Nationality: {{ $booking->nationality ?: '-' }}
ID / Passport: {{ $booking->id_passport_no ?: '-' }} @if(!empty($booking->additional_guests))

Accompanying Adults @foreach($booking->additional_guests as $guest)
{{ $guest['name'] ?: 'Name not provided' }}{{ !empty($guest['phone']) ? ' | '.$guest['phone'] : '' }}{{ !empty($guest['id_passport_no']) ? ' | ID: '.$guest['id_passport_no'] : '' }} @endforeach @endif
Room
{{ $booking->room?->name ?: $booking->room?->room_no }}
Type: {{ $booking->room?->type?->name ?: '-' }}
Status: {{ str_replace('_', ' ', ucfirst($booking->status)) }}
Payment: {{ ucfirst($booking->payment_status) }}
Confirmation: {{ $booking->confirmation_no ?: $booking->booking_no }}
@if($restaurantBills->isNotEmpty()) @foreach($restaurantBills as $bill) @endforeach @endif @if($booking->occupancy_amount > 0) @if((float) data_get($booking->rate_snapshot, 'additional_adult_amount', 0) > 0) @endif @if((float) data_get($booking->rate_snapshot, 'child_amount', 0) > 0) @endif @if((float) data_get($booking->rate_snapshot, 'additional_adult_amount', 0) <= 0 && (float) data_get($booking->rate_snapshot, 'child_amount', 0) <= 0) @endif @endif @if($booking->tax_amount > 0)@endif @foreach($restaurantBills->flatMap->items->groupBy(fn($item)=>$item->tax_name ?: $item->tax_type ?: 'Non taxable') as $taxName=>$items) @endforeach
Description Check In Expected Out Nights Rate Total
{{ $booking->ratePlan?->name ?: 'Room accommodation' }}
Meal plan: {{ $booking->ratePlan?->mealPlan?->name ?: 'Bed Only' }}
Guests: {{ $booking->adults }} adult(s), {{ $booking->children }} child(ren)
{{ $booking->check_in_at?->format('Y-m-d H:i') }} {{ $booking->expected_check_out_at?->format('Y-m-d H:i') }} {{ $booking->nights }} {{ \App\Models\SystemSetting::formatMoney($booking->rate) }} {{ \App\Models\SystemSetting::formatMoney($booking->total_amount) }}
Restaurant bill {{ $bill->invoice_no }}
@foreach($bill->items as $item){{ $item->product_name }} × {{ $item->quantity }}
@endforeach
{{ \App\Models\SystemSetting::formatMoney($bill->total_amount) }}
Room / plan amount{{ \App\Models\SystemSetting::formatMoney($booking->base_amount) }}
Additional adult supplement{{ \App\Models\SystemSetting::formatMoney(data_get($booking->rate_snapshot, 'additional_adult_amount', 0)) }}
Child supplement{{ \App\Models\SystemSetting::formatMoney(data_get($booking->rate_snapshot, 'child_amount', 0)) }}
Guest supplements{{ \App\Models\SystemSetting::formatMoney($booking->occupancy_amount) }}
Total{{ \App\Models\SystemSetting::formatMoney($folioTotal) }}
Room VAT included{{ \App\Models\SystemSetting::formatMoney($booking->tax_amount) }}
Restaurant {{ $taxName }} included{{ \App\Models\SystemSetting::formatMoney($items->sum('tax_amount')) }}
Paid / advance applied{{ \App\Models\SystemSetting::formatMoney($folioPaid) }}
Balance{{ \App\Models\SystemSetting::formatMoney($folioBalance) }}
@if(isset($roomPayments) && $roomPayments->isNotEmpty())

Room Payments

@foreach($roomPayments as $payment)@endforeach
DateMethodReferenceAmount
{{ $payment->paid_at?->format('d M Y H:i') }}{{ $payment->source==='advance'?'Customer advance':$payment->paymentMethod?->name }}{{ $payment->reference ?: '-' }}{{ \App\Models\SystemSetting::formatMoney($payment->amount) }}
@endif

Served by: {{ $booking->user?->name ?: '-' }}