@extends('layouts.print') @section('title', 'Advance Deposits — ' . \Carbon\Carbon::parse($asOf)->format('M j, Y')) @section('content') @php $propName = \App\Models\Setting::get('property_name', config('app.name', 'Parkview Hotel')); @endphp
@include('reports.print._letterhead', [ 'reportTitle' => 'Advance Deposits', 'periodLabel' => 'As of ' . \Carbon\Carbon::parse($asOf)->format('M j, Y'), 'backUrl' => route('reports.advance-deposits', ['date' => $asOf]), ])
{{-- Summary --}}
@foreach([ ['Advance Deposits Held', '₱' . number_format($totalHeld, 2), 'unearned revenue (liability)'], ['Prepaid Bookings', number_format($bookings), 'upcoming & in-house, with a deposit'], ['Avg per Booking', $bookings > 0 ? '₱' . number_format($totalHeld / $bookings, 2) : '₱0.00', 'average deposit'], ] as [$label, $value, $sub])

{{ $label }}

{{ $value }}

{{ $sub }}

@endforeach
{{-- By method + by month --}}

By Payment Method

@if(empty($byMethod))

None.

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

By Arrival Month

@if(empty($byMonth))

None.

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

Prepaid Upcoming & In-House Stays ({{ $bookings }})

@if(empty($rows))

No advance deposits held as of this date.

@else @foreach($rows as $row) @endforeach
Guest Booking # Room Arrival Value Prepaid % Paid
{{ $row['guest_name'] }} {{ $row['booking_no'] }} {{ $row['room_no'] }} {{ $row['check_in']->format('M j, Y') }} ₱{{ number_format($row['amount'], 2) }} ₱{{ number_format($row['prepaid'], 2) }} {{ $row['pct'] }}%
Total Held ₱{{ number_format($totalHeld, 2) }}
@endif
{{ $propName }} · Advance Deposits Printed {{ now()->format('M j, Y g:i A') }}
@endsection