@php $hotelName = setting('property_name', config('app.name', 'Hotel')); $hotelEmail = setting('property_email'); $hotelPhone = setting('property_phone'); $hotelWebsite = setting('property_website'); $hotelAddress = setting('property_address'); $hotelTaxNo = setting('property_tax_number'); $hotelLogo = setting_image_url('property_logo'); $currencyCode = setting('currency_code', 'USD'); $reservation = $folio->reservation; $guest = $folio->guest; $charges = $folio->charges->sortBy('created_at'); $payments = $folio->payments->sortBy('processed_at'); $taxByCategory = $folio->charges->where('is_voided', false) ->groupBy(fn ($c) => $c->category?->name ?? 'Uncategorised') ->map(fn ($group) => [ 'amount' => $group->sum('amount'), 'tax' => $group->sum('tax_amount'), ]); @endphp Invoice {{ $folio->folio_number }}
@if ($hotelLogo) @endif

{{ $hotelName }}

Invoice / Folio Statement

@if ($hotelAddress)
{{ $hotelAddress }}
@endif @if ($hotelPhone)
Tel: {{ $hotelPhone }}
@endif @if ($hotelEmail)
{{ $hotelEmail }}
@endif @if ($hotelWebsite)
{{ $hotelWebsite }}
@endif @if ($hotelTaxNo)
Tax #: {{ $hotelTaxNo }}
@endif
Invoice #
{{ $folio->folio_number }}
Issued
{{ now()->format('d M Y H:i') }}
Status
{{ \App\Models\Folio::STATUSES[$folio->status] ?? '—' }}
Currency
{{ $currencyCode }}

Bill to

@if ($guest)

{{ $guest->full_name }}

{{ $guest->guest_number }}

@if ($guest->email)

{{ $guest->email }}

@endif @if ($guest->phone)

{{ $guest->phone }}

@endif @if ($guest->address)

{{ $guest->address }}

@endif @if ($guest->city || $guest->country)

{{ trim($guest->city.', '.$guest->country, ', ') }}

@endif @endif

Stay

@if ($reservation)

{{ $reservation->confirmation_number }}

{{ $reservation->roomType?->name }}{{ $reservation->room ? ' · Room '.$reservation->room->room_number : '' }}

Check-in: {{ $reservation->check_in_date?->format('d M Y') }}

Check-out: {{ $reservation->check_out_date?->format('d M Y') }}

{{ $reservation->nights }} night(s) · {{ $reservation->total_guests }} guest(s)

@endif

Charges

@forelse ($charges as $c) @empty @endforelse
Date Description Category Qty Rate Amount Tax Total
{{ ($c->charge_date ?? $c->created_at)->format('d M') }} {{ $c->description }}{{ $c->is_voided ? ' (voided)' : '' }} {{ $c->category?->name }} {{ $c->quantity }} {{ money($c->unit_price) }} {{ money($c->amount) }} {{ money($c->tax_amount) }} {{ money($c->total_amount) }}
No charges posted.
@if ($taxByCategory->isNotEmpty())

Tax breakdown

@foreach ($taxByCategory as $name => $totals) @endforeach
Category Net amount Tax
{{ $name }} {{ money($totals['amount']) }} {{ money($totals['tax']) }}
@endif

Payments

@forelse ($payments as $p) @empty @endforelse
Date Method Reference Status Amount
{{ $p->processed_at?->format('d M H:i') }} {{ $p->paymentMethod?->name }} {{ $p->reference_number ?: '—' }} {{ \App\Models\Payment::STATUSES[$p->status] ?? $p->status }} {{ money($p->amount) }}
No payments recorded.
Total charges {{ money($folio->total_charges) }}
Total payments - {{ money($folio->total_payments) }}
Balance due {{ money($folio->balance) }}