@include('Partials.sidebar')
@include('Partials.header')

Booking Report

Booking analytics and trends @if(isset($currentTenant)) • {{ $currentTenant->name ?? 'Tenant' }} @endif

  1. ›
  2. Reports
  3. ›
  4. Bookings
{{-- Filter bar --}}
@if($from || $to) Showing {{ $totals['total'] }} of {{ $allTimeCount }} total bookings @if($totals['total'] < $allTimeCount)  — clear filter to see all @endif @else Showing all {{ $allTimeCount }} bookings (no date filter) @endif
{{-- KPI Cards --}}
@foreach([ ['Total', $totals['total'], '#64748b','fa-list'], ['Confirmed', $totals['confirmed'], '#22c55e','fa-check-circle'], ['Pending', $totals['pending'], '#f59e0b','fa-clock'], ['Cancelled', $totals['cancelled'], '#ef4444','fa-times-circle'], ['Total Value', $currency.number_format($totals['value'], 2), '#c9a96e','fa-rupee-sign'], ['Collected', $currency.number_format($totals['collected'], 2), '#3b82f6','fa-wallet'], ] as [$label,$val,$color,$icon])
{{ $label }}
{{ $val }}
@endforeach
{{-- By plot type --}}
🏠 Confirmed by Plot Type
@if($byType->isNotEmpty())
@foreach($byType as $t)
{{ $t->plot_type ?: 'Unknown' }} {{ $t->count }} • {{ $currency }}{{ number_format($t->value, 2) }}
@endforeach
@else
No confirmed bookings in this range.
@endif
{{-- Status donut --}}
📊 Status Breakdown
{{-- Daily trend --}}
📅 Daily Trend
@if(count($dailyTrend) > 0) @else
No data for selected range.
@endif
{{-- Bookings list --}}
All Bookings ({{ $bookingsList->total() }})
@forelse($bookingsList as $b) @php $statusColors = ['confirmed' => 'success', 'pending' => 'warning', 'cancelled' => 'danger']; $sc = $statusColors[$b->booking_status] ?? 'secondary'; $paidAmt = $b->transactions->where('status', 'success')->sum('amount'); $balanceAmt = max(0, (float)$b->total_amount - $paidAmt); @endphp @empty @endforelse
# Date Client Unit Type Status Total Amount Paid Balance
{{ $loop->iteration }} {{ $b->created_at->format('d M Y') }}
{{ $b->created_at->format('H:i') }}
{{ $b->client_name ?: $b->user?->name ?: '—' }}
{{ $b->client_phone ?: $b->user?->phone }}
Unit {{ $b->plot_number }} {{ $b->plot_type }} {{ ucfirst($b->booking_status) }} {{ $currency }}{{ number_format($b->total_amount, 2) }} @if($paidAmt > 0) {{ $currency }}{{ number_format($paidAmt, 2) }} @else — @endif @if($b->booking_status === 'confirmed' && $balanceAmt > 0) {{ $currency }}{{ number_format($balanceAmt, 2) }} @elseif($b->booking_status === 'confirmed' && $balanceAmt <= 0) ✓ Clear @else — @endif
No bookings found. @if($from || $to)
Clear date filter to see all bookings @endif
@if($bookingsList->hasPages()) @endif
@include('Partials.footer')