LAPORAN PENDAPATAN HOTEL

Daftar Invoice

Periode: {{ $summary['period'] }}

Dicetak pada: {{ \Carbon\Carbon::now()->format('d M Y H:i') }}

@if($status !== 'all')

Status: {{ ucfirst($status) }}

@endif
@foreach($invoices as $index => $invoice) @php $booking = $invoice->booking; $guest = $booking->guest ?? null; $bookingDetail = $booking->bookingDetails->first(); $room = $bookingDetail->room ?? null; $roomType = $room->typeRoom ?? null; $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; $lamaInap = ($checkIn && $checkOut) ? $checkIn->diffInDays($checkOut) : 0; $hargaPerMalam = $bookingDetail->price_per_night ?? 0; $totalBiaya = $invoice->room_total + $invoice->services_total; @endphp @endforeach
No Nama Tipe dan Nomor Kamar Tgl Check In Tgl Check Out Lama Inap Harga Biaya Pajak Total
{{ $index + 1 }} {{ $guest->name ?? '-' }} @if($room && $roomType) {{ $room->room_number }}- {{ $roomType->name }} @else - @endif {{ $checkIn ? $checkIn->format('d/m/Y') : '-' }} {{ $checkOut ? $checkOut->format('d/m/Y') : '-' }} {{ $lamaInap }} {{ number_format($hargaPerMalam, 0, ',', '.') }} {{ number_format($totalBiaya, 0, ',', '.') }} {{ number_format($invoice->tax_amount, 0, ',', '.') }} {{ number_format($invoice->grand_total, 0, ',', '.') }}
TOTAL {{ number_format($invoices->sum(function($invoice) { return $invoice->booking->bookingDetails->sum('price_per_night'); }), 0, ',', '.') }} {{ number_format($invoices->sum('room_total') + $invoices->sum('services_total'), 0, ',', '.') }} {{ number_format($invoices->sum('tax_amount'), 0, ',', '.') }} {{ number_format($invoices->sum('grand_total'), 0, ',', '.') }}
Total Invoice: {{ $summary['total_invoices'] }}
Total Pendapatan: Rp {{ number_format($summary['total_revenue'], 0, ',', '.') }}