@extends('layouts.print') @section('title', 'Cancellations & No-Shows — ' . \Carbon\Carbon::parse($from)->format('M j') . '–' . \Carbon\Carbon::parse($to)->format('M j, Y')) @section('content') @php $propName = \App\Models\Setting::get('property_name', config('app.name', 'Parkview Hotel')); $periodLabel = \Carbon\Carbon::parse($from)->format('M j') . ' – ' . \Carbon\Carbon::parse($to)->format('M j, Y'); @endphp
@include('reports.print._letterhead', [ 'reportTitle' => 'Cancellations & No-Shows', 'periodLabel' => $periodLabel, 'backUrl' => route('reports.cancellations', ['from' => $from, 'to' => $to]), ])
{{-- Summary --}}
@foreach([ ['Lost Bookings', number_format($lostCount), $cancelledCount . ' cancelled · ' . $noShowCount . ' no-show'], ['Lost Revenue', '₱' . number_format($lostRevenue, 2), number_format($lostRoomNights) . ' room-nights'], ['Cancellation Rate', number_format($cancellationRate, 1) . '%', 'of ' . number_format($totalBookings) . ' arriving'], ['Deposits Forfeited', '₱' . number_format($forfeitedTotal, 2), 'recovered'], ] as [$label, $value, $sub])

{{ $label }}

{{ $value }}

{{ $sub }}

@endforeach
{{-- By source --}}

By Booking Source

@if($bySource->isEmpty())

No lost bookings for this period.

@else @foreach($bySource as $source => $row) @endforeach
Source Lost Room-Nights Lost Revenue
{{ $source }} {{ $row['count'] }} {{ $row['nights'] }} ₱{{ number_format($row['revenue'], 2) }}
@endif
{{-- Detail --}}

Lost Bookings ({{ $lostCount }})

@if($rows->isEmpty())

No cancellations or no-shows in this period.

@else @foreach($rows as $row) @endforeach
Guest Room Source Arrival Nights Status Lost Forfeited
{{ $row['guest_name'] }} {{ $row['room_no'] }} {{ $row['source'] }} {{ $row['check_in']->format('M j, Y') }} {{ $row['nights'] }} {{ $row['status'] === 'no_show' ? 'No Show' : 'Cancelled' }} ₱{{ number_format($row['amount'], 2) }} {{ $row['forfeited'] > 0 ? '₱' . number_format($row['forfeited'], 2) : '—' }}
Total ₱{{ number_format($lostRevenue, 2) }} ₱{{ number_format($forfeitedTotal, 2) }}
@endif
{{ $propName }} · Cancellations & No-Shows Printed {{ now()->format('M j, Y g:i A') }}
@endsection