@extends('admin-layouts.master') @section('title', 'Laporan Pendapatan') @section('content')

Laporan Pendapatan

Total Pendapatan

Rp {{ number_format($summary['total_revenue'], 0, ',', '.') }}

Periode ini

Pendapatan Kamar

Rp {{ number_format($summary['total_room_revenue'], 0, ',', '.') }}

{{ number_format(($summary['total_revenue'] > 0 ? ($summary['total_room_revenue']/$summary['total_revenue']) * 100 : 0), 1) }}% dari total

Pendapatan Layanan

Rp {{ number_format($summary['total_service_revenue'], 0, ',', '.') }}

{{ number_format(($summary['total_revenue'] > 0 ? ($summary['total_service_revenue']/$summary['total_revenue']) * 100 : 0), 1) }}% dari total

Total Invoice

{{ $summary['paid_invoices'] + $summary['pending_invoices'] + $summary['overdue_invoices'] }}

{{ $summary['paid_invoices'] }} Lunas {{ $summary['pending_invoices'] }} Pending {{ $summary['overdue_invoices'] }} Jatuh Tempo

Daftar Invoice

@forelse($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->room_price ?? 0; $totalBiaya = $invoice->room_total + $invoice->services_total; @endphp @empty @endforelse @if($invoices->count() > 0) @endif
No Nama Tipe dan Nomor Kamar Tgl Check In Tgl Check Out Lama Inap Harga Layanan Subtotal Diskon Pajak Total Status Aksi
{{ $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($invoice->services_total, 0, ',', '.') }} {{ number_format($totalBiaya, 0, ',', '.') }} {{ number_format($invoice->discount_amount, 0, ',', '.') }} {{ number_format($invoice->tax_amount, 0, ',', '.') }} {{ number_format($invoice->grand_total, 0, ',', '.') }} @switch($invoice->status) @case('paid') Lunas @break @case('pending') Pending @break @case('cancelled') Dibatalkan @break @case('overdue') Jatuh Tempo @break @default {{ ucfirst($invoice->status) }} @endswitch
Tidak ada data invoice untuk periode ini
TOTAL: {{ number_format($invoices->sum(function($invoice) { return $invoice->booking->bookingDetails->sum('room_price'); }), 0, ',', '.') }} {{ number_format($invoices->sum('services_total'), 0, ',', '.') }} {{ number_format($invoices->sum('room_total') + $invoices->sum('services_total'), 0, ',', '.') }} {{ number_format($invoices->sum('discount_amount'), 0, ',', '.') }} {{ number_format($invoices->sum('tax_amount'), 0, ',', '.') }} {{ number_format($invoices->sum('grand_total'), 0, ',', '.') }}
@if($invoices->hasPages())
{{ $invoices->appends(request()->query())->links() }}
@endif
@if($monthlyRevenue->count() > 0)

Trend Pendapatan Bulanan

@endif
@push('scripts') @if($monthlyRevenue->count() > 0) @endif @endpush @endsection