@extends('admin.layout') @section('title', 'Laporan Invoice') @section('content')

Laporan Invoice

Analisis dan laporan komprehensif invoice hotel

Kembali ke Invoice
Filter Laporan
Total Invoice
{{ number_format($reportData['total_invoices'] ?? 0) }}
Total Pendapatan
Rp {{ number_format($reportData['total_amount'] ?? 0, 0, ',', '.') }}
Sudah Dibayar
Rp {{ number_format($reportData['paid_amount'] ?? 0, 0, ',', '.') }}
{{ $reportData['paid_count'] ?? 0 }} invoice
Belum Dibayar
Rp {{ number_format($reportData['pending_amount'] ?? 0, 0, ',', '.') }}
{{ $reportData['pending_count'] ?? 0 }} invoice
Status Invoice
Pendapatan per Channel Pembayaran
@if(request('report_type') === 'monthly')
Laporan Bulanan
@foreach($reportData['monthly_data'] as $month => $data) @endforeach
Bulan Total Invoice Total Pendapatan Sudah Dibayar Belum Dibayar Rata-rata per Invoice
{{ \Carbon\Carbon::parse($month)->format('F Y') }} {{ number_format($data['total_invoices']) }} Rp {{ number_format($data['total_amount'], 0, ',', '.') }} Rp {{ number_format($data['paid_amount'], 0, ',', '.') }} Rp {{ number_format($data['pending_amount'], 0, ',', '.') }} Rp {{ number_format($data['average_amount'], 0, ',', '.') }}
@endif @if(request('report_type') === 'detailed')
Laporan Detail Invoice
@foreach($reportData['detailed_invoices'] as $invoice) @endforeach
No. Invoice Tanggal Booking Code Nama Tamu Hotel Sumber Booking Total Status Jatuh Tempo Tanggal Pembayaran
{{ $invoice->invoice_number }} {{ $invoice->created_at->format('d/m/Y') }} {{ $invoice->booking->booking_code }} {{ $invoice->booking->guest_name }} {{ $invoice->booking->room->hotel->name ?? 'N/A' }} {{ ($invoice->booking->booking_source ?? '') === '' ? 'Internal' : $invoice->booking->booking_source }} Rp {{ number_format($invoice->total_amount, 0, ',', '.') }} @php $statusColors = [ 'draft' => 'secondary', 'sent' => 'info', 'paid' => 'success', 'overdue' => 'danger', 'cancelled' => 'dark' ]; $statusLabels = [ 'draft' => 'Draft', 'sent' => 'Terkirim', 'paid' => 'Dibayar', 'overdue' => 'Terlambat', 'cancelled' => 'Dibatalkan' ]; @endphp {{ $statusLabels[$invoice->status] ?? ucfirst($invoice->status) }} @if($invoice->due_date) {{ \Carbon\Carbon::parse($invoice->due_date)->format('d/m/Y') }} @else - @endif @if($invoice->paid_at) {{ \Carbon\Carbon::parse($invoice->paid_at)->format('d/m/Y H:i') }} @else - @endif
@endif @if(request('report_type', 'summary') === 'summary')
Breakdown Status
@foreach($reportData['status_breakdown'] as $status => $data) @endforeach
@php $labels = [ 'draft' => 'Draft', 'sent' => 'Terkirim', 'paid' => 'Dibayar', 'overdue' => 'Terlambat', 'cancelled' => 'Dibatalkan' ]; $colors = [ 'draft' => ['#6c757d', '#f2f3f5'], 'sent' => ['#17a2b8', '#e8f7fb'], 'paid' => ['#28a745', '#eaf7ea'], 'overdue' => ['#dc3545', '#fdecef'], 'cancelled' => ['#343a40', '#eceeef'] ]; $c = $colors[$status] ?? ['#6c757d', '#f2f3f5']; @endphp {{ $labels[$status] ?? ucfirst($status) }} {{ $data['count'] }} invoice Rp {{ number_format($data['amount'], 0, ',', '.') }}
Breakdown per Channel Pembayaran
@foreach($reportData['channel_breakdown'] as $channel) @endforeach
{{ $channel['name'] }} {{ $channel['count'] }} invoice Rp {{ number_format($channel['amount'], 0, ',', '.') }}
Breakdown per Sumber Booking
@foreach($reportData['source_breakdown'] as $src) @endforeach
{{ $src['name'] }} {{ $src['count'] }} invoice Rp {{ number_format($src['amount'], 0, ',', '.') }}
@endif
@endsection @push('scripts') @endpush