@extends('backend.partials.master') @section('title') {{ ___('label.booking_details') }} @endsection @section('maincontent') @php $pending = $booking->status === 'pending'; @endphp

BKG-{{ str_pad($booking->id, 5, '0', STR_PAD_LEFT) }}

{!! $booking->statusBadge() !!}
  • {{ $booking->package->title ?? ___('label.no_package_fallback') }}
  • {{ $booking->customer_name }}
  • {{ $booking->customer_phone ?: '—' }}
  • {{ $booking->customer_email ?: '—' }}
  • {{ $booking->travel_date?->translatedFormat('d M Y') ?: '—' }}
  • {{ $booking->travelers }} {{ ___('label.travellers_suffix') }}
  • {{ currency_symbol() }}{{ number_format($booking->amount) }}
@if($booking->notes)

{{ $booking->notes }}

@endif
@if($booking->customer_phone) {{ ___('label.call') }} @endif {{-- A paid or confirmed booking is the office's to unwind: cancelling it moves money and reverses a commission. --}} @if($pending)
@csrf
@endif

{{ ___('label.amend') }}

@if($pending) {{-- The fare is re-quoted from the package on save, so there is no amount field to argue with. --}}
@csrf @method('PUT')
@error('travel_date') {{ $message }} @enderror
@error('travelers') {{ $message }} @enderror
@else

{{ str_replace([':status'], [$booking->status], ___('label.booking_status_office_handles')) }}

@endif

{{ ___('menus.billing') }}

@if($invoice)
  • {{ $invoice->invoice_no }} — {{ admin_label(ucfirst($invoice->status)) }}
  • {{ ___('label.invoiced') }}: {{ currency_symbol() }}{{ number_format($invoice->amount, 2) }}
  • {{ ___('label.paid') }}: {{ currency_symbol() }}{{ number_format($invoice->paid_amount, 2) }}
  • {{ ___('label.due') }}: {{ currency_symbol() }}{{ number_format(max(0, $invoice->dueAmount()), 2) }}
@else

{{ ___('label.not_invoiced_yet_hint') }}

@endif

{{ ___('label.my_commission') }}

@if($commission)
  • {{ $commission->reference }} — {{ admin_label(ucfirst($commission->status)) }}
  • {{ ___('label.rate') }}: {{ rtrim(rtrim(number_format($commission->rate, 2), '0'), '.') }}%
  • {{ ___('label.amount') }}: {{ currency_symbol() }}{{ number_format($commission->amount, 2) }}
@else

{{ ___('label.commission_worked_out_hint') }}

@endif
@endsection