@php $proofBookings = isset($proofBookings) && $proofBookings ? $proofBookings : collect([$booking]); $isGroupedProof = isset($isGroupedProof) ? (bool) $isGroupedProof : ($proofBookings->count() > 1); $proofTotalPrice = isset($proofTotalPrice) ? (float) $proofTotalPrice : (float) $proofBookings->sum('total_price'); $proofRoomCount = isset($proofRoomCount) ? (int) $proofRoomCount : (int) $proofBookings->count(); $checkIn = $booking->check_in_date ? \Carbon\Carbon::parse($booking->check_in_date) : null; $checkOut = $booking->check_out_date ? \Carbon\Carbon::parse($booking->check_out_date) : null; $nights = ($checkIn && $checkOut) ? max(1, $checkIn->diffInDays($checkOut)) : 0; $status = strtolower((string) ($booking->status ?? 'pending')); $statusLabels = ['pending' => 'Menunggu', 'confirmed' => 'Terkonfirmasi', 'checked_in' => 'Check-in', 'checked_out' => 'Check-out', 'cancelled' => 'Dibatalkan', 'completed' => 'Selesai']; $guestName = $booking->guest->name ?? $booking->guest_name ?? '-'; $guestPhone = $booking->guest->phone ?? $booking->guest_phone ?? '-'; $guestEmail = $booking->guest->email ?? $booking->guest_email ?? '-'; $proofServices = collect(); foreach ($proofBookings as $proofBooking) { foreach (($proofBooking->roomServices ?? collect()) as $service) { $proofServices->push([ 'booking_code' => $proofBooking->booking_code ?? ('BK-' . $proofBooking->id), 'service_name' => $service->service_name ?? 'Layanan Tambahan', 'quantity' => (int) ($service->quantity ?? 1), 'unit_price' => (float) ($service->unit_price ?? 0), 'total_price' => (float) ($service->total_price ?? 0), 'notes' => trim((string) ($service->notes ?? '')), ]); } } $roomTotal = (float) $proofBookings->sum(fn ($row) => (float) ($row->total_price ?? 0)); $servicesTotal = (float) $proofServices->sum('total_price'); @endphp
@if(!empty($logoDataUri)) @else LH @endif
{{ strtoupper($settings->hotel_name ?? 'Lumbu Hotel') }}
{{ $settings->hotel_address ?? '' }}
{{ $settings->hotel_phone ?? '' }}@if(!empty($settings->hotel_email))  |  {{ $settings->hotel_email }} @endif
Reservation Receipt
Bukti Booking
{{ $booking->booking_code ?? ('BK-' . $booking->id) }}  |  {{ ($booking->booking_date ?? $booking->created_at) ? \Carbon\Carbon::parse($booking->booking_date ?? $booking->created_at)->format('d M Y') : '-' }}
{{ $statusLabels[$status] ?? ucfirst($status) }}
Detail Reservasi
Selamat datang, {{ $guestName }}.
{{ (int) ($booking->guests ?? 1) }} tamu  |  {{ $proofRoomCount }} kamar  |  {{ $nights }} malam
Nama Tamu
{{ $guestName }}
Telepon
{{ $guestPhone }}
Email
{{ $guestEmail }}
Check-in
{{ $checkIn ? $checkIn->locale('id')->translatedFormat('D, d M Y') : '-' }}
Mulai pukul {{ \App\Models\Settings::get('check_in_time', '14:00') }}
→
Check-out
{{ $checkOut ? $checkOut->locale('id')->translatedFormat('D, d M Y') : '-' }}
Sebelum pukul {{ \App\Models\Settings::get('check_out_time', '12:00') }}
Kamar
{{ $booking->room->room_number ?? $booking->unit_number ?? '-' }}
{{ $booking->room->roomType->name ?? $booking->room->type ?? '-' }}
Rincian Tagihan
@foreach($proofBookings as $rowBooking) @endforeach @foreach($proofServices as $service) @endforeach
DeskripsiJumlahNominal
{{ $rowBooking->room->roomType->name ?? $rowBooking->room->type ?? 'Kamar' }} · {{ $rowBooking->room->room_number ?? $rowBooking->unit_number ?? '-' }}
{{ $nights }} malam × Rp {{ number_format((float) ($rowBooking->base_price ?? 0), 0, ',', '.') }}  |  {{ $rowBooking->booking_code ?? ('BK-' . $rowBooking->id) }}
1 Rp {{ number_format((float) ($rowBooking->total_price ?? 0), 0, ',', '.') }}
{{ $service['service_name'] }}
{{ $service['quantity'] }} item × Rp {{ number_format($service['unit_price'], 0, ',', '.') }}@if($service['notes'] !== '')  |  {{ $service['notes'] }} @endif
{{ $service['quantity'] }} Rp {{ number_format($service['total_price'], 0, ',', '.') }}
Informasi Pembayaran
Metode Pembayaran
{{ $paymentChannelName ?? 'Belum dipilih' }}
@if(!empty($isCardPayment))
Pembayaran kartu kredit/debit dikenakan charge {{ number_format((float) ($creditCardChargeRate ?? 0), 0, ',', '.') }}%.
Nominal charge {{ number_format((float) ($creditCardChargeRate ?? 0), 0, ',', '.') }}%Rp {{ number_format((float) ($creditCardChargeAmount ?? 0), 0, ',', '.') }}
@else
Nominal pembayaran melalui {{ strtolower($paymentChannelName ?? 'metode yang dipilih') }}.
JumlahRp {{ number_format((float) ($proofTotalPrice ?? 0), 0, ',', '.') }}
@endif
@if(!empty($isCardPayment)) @endif
Total kamarRp {{ number_format($roomTotal, 0, ',', '.') }}
Layanan tambahanRp {{ number_format($servicesTotal, 0, ',', '.') }}
Charge kartu {{ number_format((float) ($creditCardChargeRate ?? 0), 0, ',', '.') }}%Rp {{ number_format((float) ($creditCardChargeAmount ?? 0), 0, ',', '.') }}
{{ !empty($isCardPayment) ? 'Total bill setelah charge' : 'Total pembayaran' }}
Rp {{ number_format((float) ($proofGrandTotal ?? $proofTotalPrice), 0, ',', '.') }}
@if(!empty($isBankTransfer))
Detail Rekening Pembayaran
Bank
{{ $bankName ?? '-' }}
Nomor Rekening
{{ $bankAccountNumber ?? '-' }}
Atas Nama
{{ $bankAccountName ?? '-' }}
@if(!empty($booking->special_requests))
Permintaan khusus: {{ $booking->special_requests }}
@endif
@elseif(!empty($booking->special_requests))
Permintaan khusus: {{ $booking->special_requests }}
@endif