@extends('admin.layout') @section('title', 'Laporan Invoice') @section('content')
Analisis dan laporan komprehensif invoice hotel
| 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, ',', '.') }} |
| 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 |
| @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, ',', '.') }} |
| {{ $channel['name'] }} | {{ $channel['count'] }} invoice | Rp {{ number_format($channel['amount'], 0, ',', '.') }} |
| {{ $src['name'] }} | {{ $src['count'] }} invoice | Rp {{ number_format($src['amount'], 0, ',', '.') }} |