@extends($bookingLayout ?? 'crm.master') @section('title', ($editingBooking ? 'Edit Booking — ' : 'Checkout — ') . $product->name) @php $bookingRoutePrefix = $bookingRoutePrefix ?? (request()->routeIs('crm.booking.*') ? 'crm.booking.' : (request()->routeIs('car-rental.*') ? 'car-rental.' : 'booking.')); @endphp @section('head-extra') @endsection @section('content')
{{-- ═══════════ LEFT: ORDER SUMMARY ═══════════ --}} {{-- ═══════════ RIGHT: BOOKING FORM ═══════════ --}}
@if($editingBooking) @endif {{-- Page heading --}}
{{ $editingBooking ? 'Edit Booking' : 'Complete Your Booking' }}
{{ $editingBooking ? 'Update booking details, taxes, and customer information' : 'Fill in your details below to confirm the reservation' }}
@if($errors->any())
    @foreach($errors->all() as $err)
  • {{ $err }}
  • @endforeach
@endif
@csrf @if($editingBooking) @endif {{-- ── SECTION 1: Customer Info ── --}} @if($editingBooking)
Change Item
Edit the booked item, dates, taxes, discount, and subtotal before saving
Status Item Qty Date Tax Total
{{ ucfirst(str_replace('_', ' ', $editingBooking->status ?? 'pending')) }}
{{ $product->name }}
{{ $appliedRateName ?: ucfirst(str_replace('_', ' ', $pricingRateType)) }}
1 {{ $start->format('M d, Y g:i A') }}
{{ $end->format('M d, Y g:i A') }}
${{ number_format($taxAmount, 2) }} ${{ number_format($total, 2) }} Change
@endif
{{ $editingBooking ? 'Customer Details' : 'Customer Information' }}
{{ $editingBooking ? 'Update the booking contact details' : 'Your contact details for this booking' }}
@error('customer_name')
{{ $message }}
@enderror
@error('customer_email')
{{ $message }}
@enderror
@error('customer_phone')
{{ $message }}
@enderror
@if(request()->routeIs('car-rental.*')) @else @endif
{{-- ── SECTION 2: Rental Location ── --}}
Rental Location *
Where will you be picking up the vehicle?
@php $oldLoc = old('rental_location', $editingBooking?->rental_location ?? ''); @endphp
@error('rental_location')
{{ $message }}
@enderror
{{-- ── SECTION 3: Booking Details ── --}}
Booking Details
Additional information about your rental
@error('is_wedding')
{{ $message }}
@enderror
@unless($editingBooking)
@endunless
{{-- ── SECTION 4: Wedding Fields (conditional) ── --}} {{-- ── Submit ── --}} @if(request()->routeIs('car-rental.*') && filled($businessSetup?->company_policy))
Business Policy
Please review the rental terms before confirming your booking
{!! $businessSetup->company_policy !!}
@error('accepted_company_policy')
{{ $message }}
@enderror
@endif
Back
@endsection @section('page-script') @php $checkoutProductsJson = json_encode( $products->mapWithKeys(function ($productItem) { return [ $productItem->id => [ 'id' => $productItem->id, 'name' => $productItem->name, 'category_id' => $productItem->category_id, 'price_rate_type' => $productItem->price_rate_type, 'base_price' => (float) $productItem->base_price, 'deposit_required' => (bool) $productItem->deposit_required, 'deposit_type' => $productItem->deposit_type, 'deposit_value' => (float) $productItem->deposit_value, 'tax_fees' => $productItem->taxFees ->where('enabled', true) ->map(function ($taxFee) { return [ 'id' => $taxFee->id, 'name' => $taxFee->name, 'percent' => (float) $taxFee->percent, ]; })->values()->all(), ], ]; })->all() ); @endphp @endsection