{{ $hotelName }}
CONSOLIDATED INVOICE
{{ $hotelAddress }}
Tel: {{ $hotelPhone }}
Invoice #: {{ $invoice->invoice_number }}
Date: {{ now()->format('d M Y H:i') }}
Guest: {{ $reservation->guest->first_name }} {{ $reservation->guest->last_name }}
Room: {{ $reservation->room->room_number }}
Check-in: {{ $reservation->check_in->format('d M Y') }}
Check-out: {{ $reservation->check_out->format('d M Y') }}
Nights: {{ $nights }}

REVENUE SUMMARY

@foreach($breakdown as $item) @endforeach
Category Net Amount Tax ({{ setting('tax_rate', 18) }}%) Total
{{ $item['label'] }} {{ number_format($item['net']) }} {{ number_format($item['tax']) }} {{ number_format($item['total']) }}
TOTAL REVENUE {{ number_format(collect($breakdown)->sum('net')) }} {{ number_format(collect($breakdown)->sum('tax')) }} {{ number_format($totalCharges) }}

TRANSACTION DETAILS

@php $runningBalance = 0; @endphp @foreach($ledgerEntries as $entry) @php $runningBalance += ($entry->debit - $entry->credit); @endphp @endforeach @php $vatRate = (float) setting('tax_rate', 18); $taxAmount = ($totalCharges * $vatRate) / (100 + $vatRate); $netAmount = $totalCharges - $taxAmount; @endphp
Date/Time Description Charges Payments Balance
{{ $entry->transaction_date->format('d M H:i') }} {{ $entry->description }} {{ $entry->debit > 0 ? number_format($entry->debit) : '-' }} {{ $entry->credit > 0 ? '(' . number_format($entry->credit) . ')' : '-' }} {{ number_format($runningBalance) }}
SUBTOTAL {{ number_format($totalCharges) }} {{ number_format($totalPayments) }}
Included Tax (VAT {{ $vatRate }}%) {{ number_format($taxAmount) }}
FINAL BALANCE DUE {{ number_format($balance) }}
@if($balance <= 0) PAID IN FULL - NO DEBT @else OUTSTANDING DEBT: {{ number_format($balance) }} {{ setting('currency_symbol', 'UGX') }} @endif