@extends('layouts.admin') @section('title', 'Booking Details') @section('content')
@if ($booking->payment_expires_at)
@if ($booking->expired_at) Automatically cancelled: the required advance was not paid within 24 hours. Original quote: {{ number_format($booking->quoted_amount, 2) }} BDT (excluded from sales and due totals). @elseif ((float) $booking->paid_amount < (float) $booking->required_payment_amount) Receive {{ number_format($booking->required_payment_amount - $booking->paid_amount, 2) }} BDT by {{ $booking->payment_expires_at->format('d M Y h:i A') }} to keep this booking active. @else Required advance received. This booking will not expire. @endif
@endif @if (auth()->user()->hasRole('super-admin') || auth()->user()->hasPermission('admin.bookings.payments.store')) @if (!$booking->expired_at && !in_array($booking->status, ['cancelled', 'refunded']) && $booking->due_amount > 0)

Receive Payment

@csrf
@endif @endif

Payment History

@forelse ($booking->paymentTransactions->sortByDesc('id') as $transaction) @empty @endforelse
TransactionDateMethod / GatewayAmount (BDT)StatusReference / Notes
{{ $transaction->transaction_no }}{{ $transaction->paid_at?->format('d M Y h:i A') ?? $transaction->created_at->format('d M Y h:i A') }} {{ $transaction->meta['payment_method'] ?? $transaction->gateway }}{{ number_format($transaction->amount, 2) }} {{ ucfirst($transaction->status) }} @if ($transaction->meta['requires_review'] ?? false)Requires review: not applied to booking@endif {{ $transaction->meta['reference'] ?? '' }} {{ $transaction->meta['notes'] ?? '' }}
No payment transactions yet.
Booking {{ $booking->booking_no }}
Back Download Invoice PDF
@csrf
Booking ID: {{ $booking->booking_no }}
Invoice ID: {{ $booking->invoice_no ?: '-' }}
Customer: {{ $booking->customer?->full_name }}
Branch: {{ $booking->branch?->name ?: '-' }}
Service: {{ $booking->serviceTypeLabel() }}
{{ $booking->serviceType() === \App\Models\Booking::SERVICE_TOUR_PACKAGE ? 'Package' : 'Item' }}: {{ $booking->itemTitle('-') }}
@if ($booking->shipTrip)
Trip: {{ $booking->shipTrip->name }}
@endif @if ($booking->service_items)
Priced as: @foreach ($booking->service_items as $item) {{ $item['quantity'] }} × {{ $item['title'] }} @ {{ number_format($item['unit_price'], 2) }}{{ $loop->last ? '' : ' · ' }} @endforeach
@endif @if ($booking->service_details)
Service Details: {!! nl2br(e($booking->service_details)) !!}
@endif
Tour Departure: @if ($booking->tourDeparture) {{ $booking->tourDeparture->departure_no }} - {{ $booking->tourDeparture->group_name }} @else - @endif
Booking Type: {{ ucfirst($booking->booking_type ?? 'offline') }}
Travel Date: {{ optional($booking->travel_date)->format('d M Y') }}
Return Date: {{ optional($booking->return_date)->format('d M Y') ?: '-' }}
@if ($booking->hotel_category) {{-- Only set on packages priced by the matrix: the grade and travel window the price was quoted from. --}}
Hotel Category: {{ $booking->hotelCategoryLabel() }}
Travel Window: {{ $booking->pickTime?->name ?: 'Any date' }}
@endif
Room Allocation: {{ $booking->room_allocation ?: '-' }}
Seat Allocation: {{ $booking->seat_allocation ?: '-' }}
Status: {{ ucfirst($booking->status) }}
Payment Status: {{ ucfirst($booking->payment_status) }}
Payment Method: {{ ucfirst($booking->payment_method_type ?? 'full') }}
Total: {{ number_format($booking->sub_total, 2) }}
Net: {{ number_format($booking->net_amount ?? $booking->total_amount, 2) }}
Paid/Due: {{ number_format($booking->paid_amount, 2) }} / {{ number_format($booking->due_amount, 2) }}
Installment Plan: {{ (int) ($booking->installment_count ?? 0) }} x {{ number_format($booking->installment_amount ?? 0, 2) }}
Next Due Date: {{ optional($booking->next_due_date)->format('d M Y') ?: '-' }}
Refund: {{ number_format($booking->refund_amount ?? 0, 2) }} on {{ optional($booking->refund_date)->format('d M Y') ?: '-' }}
Refund Reason: {{ $booking->refund_reason ?: '-' }}

Passengers
@foreach ($booking->passengers as $p) @endforeach
Name Type Passport Nationality Emergency Room Attendance
{{ $p->full_name }} {{ ucfirst($p->passenger_type) }} {{ $p->passport_number }} {{ $p->nationality }} {{ $p->emergency_contact_name }} {{ $p->emergency_contact_phone ? '(' . $p->emergency_contact_phone . ')' : '' }} {{ $p->room_no }} {{ $p->room_sharing_with ? '/ ' . $p->room_sharing_with : '' }} {{ $p->tour_attended ? 'Present' : 'Pending' }}
@endsection