@extends('layouts.app') @section('title', 'Advance Deposits') @section('nav_reports', 'bg-teal-50 text-teal-700 font-semibold') @section('page_title', 'Reports') @section('page_subtitle', 'Advance Deposits') @section('content') @include('reports._filter', [ 'active' => 'reports.advance-deposits', 'mode' => 'date', 'date' => $asOf, 'title' => 'Advance Deposits / Unearned Revenue', 'subtitle' => 'Prepayments held for stays not yet completed as of ' . \Carbon\Carbon::parse($asOf)->format('l, F j, Y'), ]) {{-- Summary tiles --}}

Advance Deposits Held

₱{{ number_format($totalHeld, 2) }}

unearned revenue (liability)

Prepaid Bookings

{{ number_format($bookings) }}

upcoming & in-house stays with a deposit

Avg per Booking

₱{{ $bookings > 0 ? number_format($totalHeld / $bookings, 2) : '0.00' }}

average deposit held

Payment Methods

{{ count($byMethod) }}

channels used

{{-- By method --}}

By Payment Method

@if(empty($byMethod))

No deposits held.

@else
@foreach($byMethod as $method => $m) @endforeach
Method Payments Amount
{{ $method }} {{ $m['count'] }} ₱{{ number_format($m['total'], 2) }}
@endif
{{-- By arrival month --}}

By Arrival Month

When these deposits will be earned

@if(empty($byMonth))

No deposits held.

@else
@foreach($byMonth as $m) @endforeach
Arrival Month Bookings Held
{{ $m['label'] }} {{ $m['count'] }} ₱{{ number_format($m['total'], 2) }}
@endif
{{-- Detail --}}

Prepaid Upcoming & In-House Stays

Stays not yet completed · ordered by arrival date

@if(empty($rows))

No advance deposits held as of this date.

@else
@foreach($rows as $row) @endforeach
Guest / Booking Room Arrival Status Booking Value Prepaid % Paid

{{ $row['guest_name'] }}

{{ $row['booking_no'] }}

{{ $row['room_no'] }}

{{ $row['room_type'] }}

{{ $row['check_in']->format('M j, Y') }} {{ \Illuminate\Support\Str::headline($row['status']) }} ₱{{ number_format($row['amount'], 2) }} ₱{{ number_format($row['prepaid'], 2) }} {{ $row['pct'] }}%
Total Held ₱{{ number_format($totalHeld, 2) }}
@endif
@endsection