@extends('crm.master') @section('title', 'Booking Index') @section('content')
@if($dateRange === 'today') Today @elseif($dateRange === 'tomorrow') Tomorrow @elseif($dateRange === 'this_week') This Week @elseif($dateRange === 'next_7') Next 7 Days @elseif($dateRange === 'this_month') This Month @elseif($dateRange === 'next_30') Next 30 Days @elseif($dateRange === 'last_30') Last 30 Days @elseif($dateRange === 'custom' && $dateFrom && $dateTo) {{ \Carbon\Carbon::parse($dateFrom)->format('M j') }} – {{ \Carbon\Carbon::parse($dateTo)->format('M j, Y') }} @else All bookings @endif — {{ $bookings->total() }} result{{ $bookings->total() !== 1 ? 's' : '' }}
| Booking @if($curSort === 'booking_number') @else @endif | Start @if($curSort === 'start_datetime') @else @endif | End @if($curSort === 'end_datetime') @else @endif | Created @if($curSort === 'created_at') @else @endif | Customer @if($curSort === 'customer_name') @else @endif | Item(s) | Amount @if($curSort === 'total_amount') @else @endif | Paid | Due | Status | |
|---|---|---|---|---|---|---|---|---|---|---|
| {{-- ── Booking # ── --}} |
{{ $booking->booking_number }}
@if($firstItem)
{{ $firstItem->product_name }}
@endif
|
{{-- ── Start ── --}}
{{ $booking->start_datetime->format('m/d/y') }}
{{ $booking->start_datetime->format('h:i A') }}
|
{{-- ── End ── --}}
{{ $booking->end_datetime->format('m/d/y') }}
{{ $booking->end_datetime->format('h:i A') }}
|
{{-- ── Created ── --}}
{{ $booking->created_at->format('m/d/y') }}
{{ $booking->created_at->format('h:i A') }}
|
{{-- ── Customer ── --}}
{{ $booking->customer_name }}
@if($booking->customer_email)
{{ $booking->customer_email }}
@endif
@if($booking->customer_phone)
{{ $booking->customer_phone }}
@endif
|
{{-- ── Items ── --}}
@forelse($booking->items as $item)
{{ $item->product_name }}
@if($item->quantity)
Qty {{ $item->quantity }}
@endif
|
{{-- ── Total ── --}}
${{ number_format($totalAmount, 2) }}
|
{{-- ── Paid ── --}}
${{ number_format($paidAmount, 2) }}
|
{{-- ── Due ── --}}
@if($balance > 0)
${{ number_format($balance, 2) }}
@else
$0.00
@endif
|
{{-- ── Status ── --}}
{{ $booking->status_label }} |
|
No bookings found @if($hasFilters) Clear filters @endif |
||||||||||