@if (isset($booking))

Oder ID: {{ $booking->offer_id ?? 'Booking Details' }}

@if ($booking->payment_status == 'paid' && $booking->booking_status == 'confirmed') Download Ticket in PDF @endif @if ($booking->payment_status == 'pending' && $booking->booking_status == 'hold') @if (!empty($booking->order_expire_at) && \Carbon\Carbon::parse($booking->order_expire_at)->isFuture()) Pay Now @else Expired @endif @endif Search More Flights
@php $offer = json_decode($booking->flight_info, true); @endphp @if (isset($offer) && $offer != null)

{{ $offer['slices'][0]['origin']['iata_code'] ?? 'N/A' }} - {{ $offer['slices'][0]['destination']['iata_code'] ?? 'N/A' }}

{{ $offer['slices'][0]['origin']['city_name'] ?? 'Origin' }} to {{ $offer['slices'][0]['destination']['city_name'] ?? 'Destination' }}
{{ ucfirst($offer['slices'][0]['passengers'][0]['cabin_class_marketing_name'] ?? 'Economy') }} ยท {{ $booking->airline_name ?? 'Airline' }}
@foreach ($offer['slices'] as $sliceIndex => $slice) @php $departureTime = \Carbon\Carbon::parse($slice['segments'][0]['departing_at']); $arrivalTime = \Carbon\Carbon::parse($slice['segments'][0]['arriving_at']); $duration = $departureTime->diffForHumans($arrivalTime, ['parts' => 2]); $isNonStop = count($slice['segments']) === 1; @endphp
{{ $departureTime->format('D, j M Y') }}, {{ $departureTime->format('H:i') }}
Depart from: {{ $slice['segments'][0]['origin']['name'] ?? 'Airport' }} ({{ $slice['segments'][0]['origin']['iata_code'] ?? 'N/A' }}) - @if (isset($slice['segments'][0]['origin_terminal'])) Terminal {{ $slice['segments'][0]['origin_terminal'] }} @endif
Flight Duration: {{ $duration }}
{{ $slice['segments'][0]['origin']['iata_code'] ?? 'N/A' }} - {{ $slice['segments'][0]['destination']['iata_code'] ?? 'N/A' }} - {{ $isNonStop ? 'Non-stop' : 'With stops' }}
{{ $arrivalTime->format('D, j M Y') }}, {{ $arrivalTime->format('H:i') }}
Arrive at: {{ $slice['segments'][0]['destination']['name'] ?? 'Airport' }} ({{ $slice['segments'][0]['destination']['iata_code'] ?? 'N/A' }}) - @if (isset($slice['segments'][0]['destination_terminal'])) Terminal {{ $slice['segments'][0]['destination_terminal'] }} @endif
@endforeach

Flight Information

Airline
{{ $booking->airline_name ?? 'N/A' }}
Flight Number
{{ $offer['slices'][0]['segments'][0]['operating_carrier_flight_number'] ?? 'N/A' }}
Cabin Class
{{ ucfirst($offer['slices'][0]['passengers'][0]['cabin_class_marketing_name'] ?? 'Economy') }}
Checked Baggage
@if (!empty($offer['slices'][0]['passengers'][0]['baggages'])) @foreach ($offer['slices'][0]['passengers'][0]['baggages'] as $baggage) @if ($baggage['type'] === 'checked') {{ $baggage['quantity'] ?? 1 }} bag @endif @endforeach @else N/A @endif
Carry-on
@if (!empty($offer['slices'][0]['passengers'][0]['baggages'])) @foreach ($offer['slices'][0]['passengers'][0]['baggages'] as $baggage) @if ($baggage['type'] === 'carry_on') {{ $baggage['quantity'] ?? 1 }} bag @endif @endforeach @else N/A @endif
@if (isset($offer['slices'][0]['segments'][0]['aircraft']['name']))
Aircraft
{{ $offer['slices'][0]['segments'][0]['aircraft']['name'] ?? 'N/A' }}
@endif

Passengers

@foreach ($passengers as $passengerIndex => $passenger)
{{ ucfirst($passenger['type'] ?? 'Adult') }} {{ $passengerIndex + 1 }}
{{ $passenger['title'] ?? '' }} {{ $passenger['given_name'] ?? '' }} {{ $passenger['family_name'] ?? '' }}
Email
{{ $passenger['email'] ?? 'N/A' }}
Phone
{{ $passenger['phonecode'] ?? '' }} {{ $passenger['phone_number'] ?? 'N/A' }}
Date of Birth
{{ $passenger['born_on'] ?? 'N/A' }}
Gender
{{ ucfirst($passenger['gender'] ?? 'N/A') }}
@endforeach

Policies

Flight Change Policy

Make changes to this flight up until the departure date (a change penalty may apply)

Order Change Policy

Make changes to this order up until the initial departure date (a change penalty may apply)

Refund Policy

This order may be refundable subject to airline terms and conditions

@endif

Summary

Order ID {{ $booking->offer_id ?? 'N/A' }}
Status {{ ucfirst($booking->booking_status) }}
Airline {{ $booking->airline_name ?? 'N/A' }}
Created {{ $booking->created_at ? \Carbon\Carbon::parse($booking->created_at)->format('D, j M Y, H:i') : 'N/A' }}
@if (isset($offer))

Price Breakdown

Fare Details
@php $baseAmount = $offer['base_amount'] ?? 0; $taxAmount = $offer['tax_amount'] ?? 0; $currency = $offer['total_currency'] ?? 'USD'; $totalServiceAmount = $booking->services_total ?? 0; @endphp
Base Fare {{ $currency }} {{ number_format($baseAmount, 2) }}
Taxes & Fees {{ $currency }} {{ number_format($taxAmount, 2) }}
Service Fee {{ $currency }} {{ number_format($booking->service_charges ?? 0, 2) }}
@if ($totalServiceAmount > 0)
Extra Services {{ $currency }} {{ number_format($totalServiceAmount, 2) }}
@endif
Total {{ $booking->currency }} {{ number_format($booking->total_amount, 2) }}
@endif
@else

Booking Not Found

The requested booking information could not be found.

@endif