@extends('admin.layout.main') @section('title',$header['title']) @section('content')
@method('PUT') @csrf
Customer Details Hotel Details Payment Details Cancellation Policies @if($additional_details->booking_status == 'confirmed' && now()->format('Y-m-d') < $booking_detail->booking_start_date) Cancel Booking @endif
Customer Details
{{--
--}}
@php $bookingFrom = ''; if(isset($additional_details->booking_from)){ $bookingVia = $additional_details->booking_from; if($bookingVia == 'web'){ $bookingFrom = 'B2C Desktop'; } elseif($bookingVia == 'b2c_mobile_browser'){ $bookingFrom = 'B2C Mobile Browser'; } elseif($bookingVia == 'b2c_mobile_app'){ $bookingFrom = 'B2C Mobile App'; } else{ $bookingFrom = ''; } } @endphp
@php $specialRequests = $customer_details['specialRequests'] ?? []; @endphp @if(!empty($specialRequests))
Special Request
@foreach($specialRequests as $specialRequest)
@endforeach
@endif
@php $searchDetails = $search_details; $hotelDetails = $hotel_details['hotelDetails']; $roomDetails = $hotel_details['selectedRooms']; $cancellationPolicies = $hotel_details['cancellationPolicy'] ?? []; $paymentDetails = $processed_price; $billingDetails = $billing_details; @endphp
Booking Hotel Details
Hotel Details
Hotel Name: {{$hotelDetails['DisplayName']}}
Hotel Image
{{$hotelDetails['PropertyType'] ?? 'Hotel'}}
{{$hotelDetails['DisplayName'] ?? ''}} @php $starRating = $hotelDetails['StarRating'] ?? 0; @endphp @for ($i = 1; $i <= 5; $i++) @if ($i <=$starRating) @else @endif @endfor

{{$hotelDetails['Address'] ?? ''}}

@php $checkIn = isset($searchDetails['checkInDate']) ? \Carbon\Carbon::parse($searchDetails['checkInDate']) : \Carbon\Carbon::parse($searchDetails['stay']['checkIn'] ?? null); $checkOut = isset($searchDetails['checkOutDate']) ? \Carbon\Carbon::parse($searchDetails['checkOutDate']) : \Carbon\Carbon::parse($searchDetails['stay']['checkOut'] ?? null); $nights = $checkIn && $checkOut ? $checkIn->diffInDays($checkOut) : 0; @endphp
Check In: {{$checkIn->format('d/m/Y')}}
Check Out: {{$checkOut->format('d/m/Y')}}
Number of Nights: {{ $nights }}
Persons: {{$roomDetails['AdultsCount'] ?? ''}}

Room Type: {{$roomDetails['RoomBasis'] ?? ''}}


@if(!empty($searchDetails['occupancies']) && is_array($searchDetails['occupancies']))
Occupancy Details
@foreach($searchDetails['occupancies'] as $index => $room)
Room {{ $index + 1 }}
  • Adults: {{ $room['adults'] ?? 0 }}
  • Children: {{ $room['children'] ?? 0 }}
  • @if(!empty($room['paxes']) && is_array($room['paxes']))
  • Children Ages: @foreach($room['paxes'] as $pax) @if(($pax['type'] ?? '') === 'CH') {{ $pax['age'] ?? 'N/A' }} yrs @endif @endforeach
  • @endif
  • Nationality: {{$customer_details['country_name'] ?? ($customer_details['nationality'] ?? '')}}
@endforeach
@else

No room details available.

@endif
Room Details
Hotel Name: {{$hotelDetails['DisplayName']}}
Payment Details
{{--
--}}
{{--
* MarkupFee + Service Fee
--}}
@php $payment_status = ''; if($additional_details->booking_status && $additional_details->booking_status == 'confirmed') { $payment_status = "Success"; } else { $payment_status = "Failed"; } @endphp
*Note: Grand Total = Base Fare + Service Fee + Markup Fee + Addon Amount - (Coupon Amount + Wallet Amount + Redeem Amount)
Billing Details
@foreach($billingDetails as $index => $value) @if(ucwords($index) !== 'State_id' && ucwords($index) !== 'Country_id')
@endif @endforeach
Cancellation Policies
@if (!empty($cancellationPolicies) && is_array($cancellationPolicies)) {{-- Cancellation Policies --}} @php $date = ''; $policies = $cancellationPolicies['CancellationPolicies'] ?? []; $originalPolicies = $cancellationPolicies['CancellationPoliciesOriginal'] ?? []; if(!empty($originalPolicies)) { $rawDate = $originalPolicies[0]['DateFrom']; preg_match('/\/Date\((\d+)(?:[+-]\d+)?\)\//', $rawDate, $matches); if (isset($matches[1])) { $timestamp = $matches[1] / 1000; $date = Carbon\Carbon::createFromTimestamp($timestamp); } } @endphp @if (!empty($policies))
Cancellation Policies
@foreach ($policies as $policy)
@if ($policy['Refundable'])

Free Cancellation {{ $policy['Subtitle'] ?? '-' }}, Otherwise the below cancellation policy applies.

Refundable Amount: {{ $policy['Amount'] ?? '0' }} {{ $policy['Currency'] ?? '' }}

@else

@if($date) If the reservation is cancelled {{ $policy['Subtitle'] ?? '-' }}, a cancellation penalty of {{ $policy['Amount'] ?? 0 }} {{ $policy['Currency'] ?? '' }} will apply. @endif

@endif @if (!empty($policy['Comments']))

{{ $policy['Comments'] }}

@endif
@endforeach
@else
No cancellation policies found.
@endif {{-- Booking Remarks --}} @if (!empty($cancellationPolicies['BookingRemarks']))
Booking Remarks
@php $bookingRemarks = $cancellationPolicies['BookingRemarks'] ?? ''; $maxLength = 400; $isLong = strlen(strip_tags($bookingRemarks)) > $maxLength; $uniqueId = 'remarks_' . uniqid(); @endphp
@if($isLong) {!! Str::limit(strip_tags($bookingRemarks), $maxLength)!!}... See More @else {!! $bookingRemarks !!} @endif
@endif @else
Cancellation policy data not available.
@endif
@endsection @section('js')
@append