{{-- Header --}}
@php $logoPath = null; if (!empty($settings?->hotel_logo)) { $computedPath = public_path('storage/' . $settings->hotel_logo); if (file_exists($computedPath)) { $logoPath = $computedPath; } } @endphp @if($logoPath) @else
LOGO
HOTEL
@endif
{{ $invoice->hotel_name ?? '-' }}
@if(!empty($invoice->hotel_address)) {{ $invoice->hotel_address }}
@endif @if(!empty($invoice->hotel_phone)) Tel: {{ $invoice->hotel_phone }}
@endif @if(!empty($invoice->hotel_email)) Email: {{ $invoice->hotel_email }} @endif

INVOICE

{{ $invoice->invoice_number ?? '-' }}
{{ optional($invoice->issued_at)->format('d/m/Y') ?? '-' }}
@php $status = strtolower((string)($invoice->status ?? '')); @endphp {{ $status ? ucfirst($status) : 'Status' }}
{{-- Billing Section --}}
Bill To:
{{ $invoice->guest_name ?? '-' }}
{{ $invoice->guest_email ?? '-' }}
@if(!empty($invoice->guest_phone))
{{ $invoice->guest_phone }}
@endif
Booking Details:
Booking ID: {{ optional($invoice->booking)->booking_code ?? 'N/A' }}
Check-in: {{ optional($invoice->check_in_date)->format('d/m/Y') ?? '-' }}
Check-out: {{ optional($invoice->check_out_date)->format('d/m/Y') ?? '-' }}
Duration: {{ (int)($invoice->nights ?? 0) }} {{ (int)($invoice->nights ?? 0) > 1 ? 'nights' : 'night' }}
{{-- Details Table --}} @if(optional($invoice->booking)->roomServices && optional($invoice->booking->roomServices)->count() > 0) @foreach($invoice->booking->roomServices as $service) @endforeach @endif
Description Room Nights Rate Amount
{{ ($invoice->room_type ?? '-') . ' Room' }} {{ $invoice->room_number ?? '-' }} {{ (int)($invoice->nights ?? 0) }} Rp {{ number_format((float)($invoice->room_rate ?? 0), 0, ',', '.') }} Rp {{ number_format((float)($invoice->subtotal ?? 0), 0, ',', '.') }}
{{ $service->service_name }} - {{ (int)($service->quantity ?? 0) }} Rp {{ number_format((float)($service->unit_price ?? 0), 0, ',', '.') }} Rp {{ number_format((float)($service->total_price ?? 0), 0, ',', '.') }}
{{-- Totals --}}
Room Subtotal: Rp {{ number_format((float)($invoice->subtotal ?? 0), 0, ',', '.') }}
@if((float)($invoice->services_total ?? 0) > 0)
Services Total: Rp {{ number_format((float)($invoice->services_total ?? 0), 0, ',', '.') }}
@endif @if((float)($invoice->tax_amount ?? 0) > 0)
Tax: Rp {{ number_format((float)($invoice->tax_amount ?? 0), 0, ',', '.') }}
@endif
TOTAL: Rp {{ number_format((float)($invoice->total_amount ?? 0), 0, ',', '.') }}
{{-- Notes --}} @if(!empty($invoice->notes))
Special Requests / Notes:
{{ $invoice->notes }}
@endif {{-- Footer --}}