{{-- resources/views/reports/reservations.blade.php --}} @extends('layouts.app') @section('title', 'Reservations Report') @section('page_title', 'Reservations Report') @section('page_subtitle', $from->format('d M Y') . ' — ' . $to->format('d M Y')) @section('content') @include('reports.partials.nav') @include('reports.partials.filters', ['route' => 'reports.reservations'])
{{ $total }}
Total Reservations
{{ $confirmed }}
Confirmed / Stayed
{{ $avg_nights }}
Avg Nights
${{ number_format($avg_value, 0) }}
Avg Booking Value
{{-- By Source --}}
By Booking Source
@php $sourceTotal = $by_source->sum(); @endphp @forelse($by_source->take(10) as $source => $count)
{{ ucfirst(str_replace('_', ' ', $source)) }} {{ $count }} ({{ $sourceTotal > 0 ? round(($count / $sourceTotal) * 100, 0) : 0 }}%)
@empty

No data

@endforelse
{{-- By Status --}}
By Status
@php $statusColors = [ 'tentative' => '#f59e0b', 'confirmed' => '#3b82f6', 'checked_in' => '#10b981', 'checked_out' => '#64748b', 'cancelled' => '#ef4444', 'no_show' => '#f97316', ]; $statusTotal = $by_status->sum(); @endphp @forelse($by_status as $status => $count)
{{ ucfirst(str_replace('_', ' ', $status)) }}
{{ $count }} {{ $statusTotal > 0 ? round(($count / $statusTotal) * 100, 0) : 0 }}%
@empty

No data

@endforelse
@endsection