@extends('pdf.layout', [ 'documentTitle' => 'Hotel Voucher', 'documentNo' => $booking->booking_no, 'documentStatus' => $booking->status, 'documentStatusTone' => match($booking->status) { 'Paid', 'Confirmed' => 'paid', 'Cancelled' => 'void', default => 'due', }, ]) @section('body') @php $symbol = currency_symbol(); $nights = max(1, (int) $booking->nights); $perNight = (float) $booking->amount / $nights; $location = collect([optional($booking->hotel)->city, optional($booking->hotel)->country])->filter()->join(', '); @endphp
Guest
{{ $booking->guest_name }}
Hotel
{{ optional($booking->hotel)->name ?: '—' }}
@if($location)
{{ $location }}
@endif

Stay

Check-in Check-out Nights Room
{{ dateFormat($booking->check_in) }} {{ dateFormat($booking->check_out) }} {{ $nights }} {{ optional($booking->hotelRoom)->room_type ?: '—' }}
Per night {{ $symbol }}{{ number_format($perNight, 2) }}
Nights {{ $nights }}
Total {{ $symbol }}{{ number_format((float) $booking->amount, 2) }}
Present this voucher at check-in together with the guest's photo ID or passport. Room allocation is at the hotel's discretion and subject to availability on arrival.
@endsection