@extends('landing-page.layouts.default') @section('content')

{{ $bookingData['booking_detail']['status_label'] }}

@if ($bookingData['booking_detail']['status'] === 'cancelled' && !empty($bookingData['booking_detail']['reason']))

{{ __('landingpage.cancel_reason') }}: {{ $bookingData['booking_detail']['reason'] }}

@endif {{ __('landingpage.check_status') }}
@if ($bookingData['booking_detail']['booking_package'] == null)
#{{ $bookingData['booking_detail']['id'] }} {{ $bookingData['booking_detail']['service_name'] }}
@else
#{{ $bookingData['booking_detail']['id'] }} {{ $bookingData['booking_detail']['booking_package']['name'] }}
@endif

{{ $bookingData['booking_detail']['booking_date'] }}

@if ($serviceType === 'free') {{ __('landingpage.free') }} @endif @if (!empty($bookingData['service']['type'] === 'hourly'))
{{ __('landingpage.service_total_time') }}: @if (!empty($bookingData['booking_detail']['duration_diff_hour'])) @php $durationParts = $bookingData['booking_detail'][ 'duration_diff_hour' ] ? $bookingData['booking_detail']['duration_diff_hour'] : null; @endphp
  • @if ($durationParts !== null) {{ $durationParts }} @else '-' @endif
  • @endif
    @endif
    @if ( $bookingData['booking_detail']['status'] === 'pending' && ($bookingData['booking_detail']['payment_status'] !== 'failed' || $bookingData['booking_detail']['payment_status'] === 'pending' || $bookingData['booking_detail']['payment_status'] === 'advanced_paid')) @if ( !$bookingData['service']['is_enable_advance_payment'] || ($bookingData['service']['is_enable_advance_payment'] && $bookingData['booking_detail']['payment_status'] === 'advanced_paid'))
    @endif @endif @if ( $bookingData['booking_detail']['status'] === 'completed' && ($bookingData['booking_detail']['payment_status'] === null || $bookingData['booking_detail']['payment_status'] === 'failed' || $bookingData['booking_detail']['payment_status'] === 'advanced_paid') && $bookingData['booking_detail']['total_amount'] != 0)
    @php $remainingPrice = $bookingData['booking_detail']['total_amount'] - ($bookingData['booking_detail']['advance_paid_amount'] ?? 0); $payablePrice = $remainingPrice > 0 ? $remainingPrice : $bookingData['booking_detail']['total_amount']; @endphp {{ __('landingpage.pay_now') }} ({{ getPriceFormat($payablePrice) }})
    @endif @if ($bookingData['booking_detail']['status'] === 'on_going')
    {{ __('messages.on_going') }}
    @elseif(isset($bookingData['shop_data']) && !empty($bookingData['shop_data'])) @if (isset($bookingData['handyman_data']) && !empty($bookingData['handyman_data'])) @if ($bookingData['booking_detail']['status'] === 'accept') @endif @endif @endif @if ($bookingData['booking_detail']['status'] === 'in_progress')
    @if ($bookingData['service']['type'] !== 'fixed') @endif
    @endif @if ($bookingData['booking_detail']['status'] === 'hold')
    @endif @if ($bookingData['booking_detail']['status'] === 'pending_approval')
    {{ __('landingpage.waiting_for_response') }}...
    @endif
    @php $imageSource = null; if ($bookingData['booking_detail']['booking_package'] == null) { $imageSource = !empty($bookingData['service']['attchments']) ? $bookingData['service']['attchments'][0] : null; } else { $imageSource = !empty( $bookingData['booking_detail']['booking_package']['attchments'] ) ? $bookingData['booking_detail']['booking_package']['attchments'][0] : null; } @endphp service-detail
    @if (!empty($bookingData['booking_detail']['booking_package']))
    {{ __('landingpage.include_package') }}
    @php $servicepackage = $bookingData['booking_detail']['booking_package']; $services = isset($servicepackage['services']) && is_array($servicepackage['services']) ? $servicepackage['services'] : []; @endphp @foreach ($services as $service) @php $category_name = $service['category_name'] ?? '-'; $subcategory_name = $service['subcategory_name'] ?? ''; $service_image = isset($service['attchments'][0]) ? $service['attchments'][0] : asset('images/default.png'); $service_price = $service['price'] ?? 0; @endphp
    service-image
    {{ $service['name'] }}
    • {{ $category_name }}
    • {{ $subcategory_name }}
    {{ getPriceFormat($service_price) }}
    @endforeach
    @endif @if (isset($bookingData['shop_data']) && !empty($bookingData['shop_data']))
    {{ __('landingpage.about_shop') }}

    {{ $bookingData['shop_data']['contact_number'] }}

    {{ $bookingData['shop_data']['email'] }}

    {{ \Carbon\Carbon::parse($bookingData['shop_data']['shop_start_time'])->format('g:i A') }} - {{ \Carbon\Carbon::parse($bookingData['shop_data']['shop_end_time'])->format('g:i A') }}

    {{ $bookingData['shop_data']['address'] }}, {{ $bookingData['shop_data']['city_name'] }}, {{ $bookingData['shop_data']['state_name'] }}, {{ $bookingData['shop_data']['country_name'] }}

    @endif @if ($bookingData['booking_detail']['BookingAddonService'])

    {{ __('landingpage.Add-ons') }}

    @foreach ($bookingData['booking_detail']['BookingAddonService'] as $serviceaddon)
    service-image
    {{ $serviceaddon['name'] }}
    {{ getPriceFormat($serviceaddon['price']) }}
    @endforeach
    @endif
    @if (!empty($bookingData['handyman_data'])) @endif
    {{ __('landingpage.about_provider') }} @if (isset($bookingData['handyman_data']) && count($bookingData['handyman_data']) > 0 && $bookingData['provider_data']['id'] === $bookingData['handyman_data'][0]['id'] ) ({{ __('landingpage.as_handyman') }} ) @endif
    {{ $bookingData['provider_data']['display_name'] }}
    @if ( $bookingData['booking_detail']['status'] == 'accept' || $bookingData['booking_detail']['status'] == 'on_going' || $bookingData['booking_detail']['status'] == 'in_progress' || $bookingData['booking_detail']['status'] == 'hold') @endif
    @if (!empty($bookingData['handyman_data']))
    @foreach ($bookingData['handyman_data'] as $handyman) @if ($bookingData['provider_data']['id'] !== $handyman['id'])
    {{ __('landingpage.about_handyman') }}
    {{ $handyman['display_name'] }}
    @if ( $bookingData['booking_detail']['status'] == 'accept' || $bookingData['booking_detail']['status'] == 'on_going' || $bookingData['booking_detail']['status'] == 'in_progress' || $bookingData['booking_detail']['status'] == 'hold') @endif @php $handymanrating = App\Models\HandymanRating::where( 'booking_id', $bookingData['booking_detail']['id'], ) ->where('customer_id', auth()->user()->id) ->where('handyman_id', $handyman['id']) ->first(); @endphp @if ($bookingData['booking_detail']['status'] == 'completed') @endif
    @endif @endforeach
    @endif
    @php $amount = $bookingData['booking_detail']['amount'] * $bookingData['booking_detail']['quantity']; $addonAmount = 0; if ( isset($bookingData['booking_detail']['BookingAddonService']) && is_array($bookingData['booking_detail']['BookingAddonService']) ) { foreach ($bookingData['booking_detail']['BookingAddonService'] as $addon) { $amount += $addon['price']; // Add the price of each addon to the total amount $addonAmount += $addon['price']; } } @endphp @if ($amount > 0)
    @if ($bookingData['booking_detail']['status'] == 'cancelled' && $bookingData['booking_detail']['refund_amount'])
    {{ __('messages.refund_price_detail') }}
    @if (!empty($bookingData['bookingpackage'])) @else @endif @if ($bookingData['service']['is_enable_advance_payment'] == 1) @endif
    {{ __('messages.refund_of') }} {{ getPriceFormat($bookingData['booking_detail']['refund_amount']) ?? 0 }}
    {{ ucfirst($bookingData['booking_detail']['refund_status']) ?? '-' }}
    {{ __('messages.payment_method') }}
    {{ ucfirst($bookingData['booking_detail']['payment_method']) ?? '-' }}
    {{ __('messages.price') }} {{ getPriceFormat($bookingData['bookingpackage']['price']) }} {{ getPriceFormat($bookingData['booking_detail']['amount']) }}
    {{ __('landingpage.advance_payment') }}
    {{ getPriceFormat($bookingData['booking_detail']['advance_paid_amount']) ?? 0 }}
    {{ __('messages.cancellation_charge') }}
    {{ getPriceFormat($bookingData['booking_detail']['cancellation_charge_amount']) ?? 0 }}
    {{ __('messages.refund_amount') }}
    {{ getPriceFormat($bookingData['booking_detail']['refund_amount']) ?? 0 }}
    @endif
    {{ __('landingpage.price_detail') }}
    @if (!empty($bookingData['bookingpackage'])) @else @endif @if (!empty($bookingData['booking_detail']['final_discount_amount'])) @endif @if ( $bookingData['coupon_data'] && $bookingData['booking_detail']['final_coupon_discount_amount'] < $bookingData['booking_detail']['total_amount'] ) @endif @if ( !empty($bookingData['booking_detail']['redeemed_discount']) && !empty($bookingData['booking_detail']['redeemed_points'])) @endif @if (!empty($bookingData['booking_detail']['BookingAddonService'])) @endif @if (!empty($bookingData['booking_detail']['extra_charges_value'])) @endif @php $totalamount = $bookingData['booking_detail']['post_request_id'] == null ? getPriceFormat( $bookingData['booking_detail']['final_sub_total'], ) : getPriceFormat( $bookingData['booking_detail']['total_amount'], ); $subtotal = $totalamount ?? 0; @endphp @if ($bookingData['booking_detail']['post_request_id'] == null) @endif @if ($bookingData['service']['is_enable_advance_payment'] == 1) @if ($bookingData['booking_detail']['status'] !== 'cancelled') @endif @endif
    {{ __('messages.price') }} {{ getPriceFormat($bookingData['bookingpackage']['price']) }} {{ $bookingData['booking_detail']['post_request_id'] == null ? getPriceFormat($bookingData['booking_detail']['final_total_service_price']) : getPriceFormat($bookingData['booking_detail']['amount']) }}
    {{ __('messages.discount') }} ({{ $bookingData['booking_detail']['discount'] }}% {{ __('landingpage.off') }}) -{{ getPriceFormat($bookingData['booking_detail']['final_discount_amount']) }} {{-- -{{ getPriceFormat($bookingData['booking_detail']['discount']/100) }} --}}
    {{ __('landingpage.coupon') }} ({{ $bookingData['coupon_data']['code'] }}) -{{ getPriceFormat($bookingData['booking_detail']['final_coupon_discount_amount']) }}
    {{ __('messages.redeem_discount') }} ( {{ $bookingData['booking_detail']['redeemed_points'] }} pts ) -{{ getPriceFormat($bookingData['booking_detail']['redeemed_discount']) }}
    {{ __('landingpage.Add-ons') }} {{ getPriceFormat($addonAmount) }}
    {{ __('landingpage.total_extra_charges') }} {{ getPriceFormat($bookingData['booking_detail']['extra_charges_value']) }}
    {{ __('landingpage.subtotal') }} {{ $subtotal }}
    {{ __('landingpage.tax') }} @if ($bookingData['booking_detail']['final_total_tax'] > 0) +{{ getPriceFormat($bookingData['booking_detail']['final_total_tax']) }} @else +{{ getPriceFormat($bookingData['booking_detail']['final_total_tax']) }} @endif
    {{ __('landingpage.total') }}
    {{ getPriceFormat($bookingData['booking_detail']['total_amount']) }}
    {{ __('landingpage.advance_payment') }}
    {{ getPriceFormat($bookingData['booking_detail']['advance_paid_amount']) }}
    {{ __('messages.remaining_amount') }} @if ($bookingData['booking_detail'] != null && $bookingData['booking_detail']['payment_status'] !== 'paid') {{ __('messages.pending') }} @endif @if ($bookingData['booking_detail'] != null && $bookingData['booking_detail']['payment_status'] == 'paid') {{ __('messages.paid') }} @else {{ getPriceFormat($bookingData['booking_detail']['total_amount'] - $bookingData['booking_detail']['advance_paid_amount']) }} @endif
    @if (count($bookingData['booking_detail']['extra_charges']) > 0)
    {{ __('landingpage.extra_charges') }}
    @foreach ($bookingData['booking_detail']['extra_charges'] as $charge) @endforeach
    {{ $charge['title'] }}
    {{ getPriceFormat($charge['price']) }}*{{ $charge['qty'] }} = {{ getPriceFormat($charge['price'] * $charge['qty']) }}
    @endif @if (!empty($bookingData['booking_detail']['payment_id']))
    {{ __('landingpage.payment_detail') }}
    @if ($bookingData['booking_detail']['txn_id']) @endif
    {{ __('landingpage.id') }} #{{ $bookingData['booking_detail']['payment_id'] }}
    {{ __('messages.method') }} {{ $bookingData['booking_detail']['payment_method'] }}
    {{ __('messages.status') }} {{ str_replace('_', ' ', $bookingData['booking_detail']['payment_status']) }}
    {{ __('landingpage.transaction_id') }} {{ $bookingData['booking_detail']['txn_id'] }}
    @endif
    @endif
    @if ( $bookingData['booking_detail']['payment_id'] !== null && $bookingData['booking_detail']['payment_status'] == 'paid' && $bookingData['booking_detail']['status'] == 'completed') {{ __('landingpage.request_invoice') }} @endif
    @if ( ($bookingData['service']['is_enable_advance_payment'] == 1 && $bookingData['booking_detail']['payment_id'] == null) || ($bookingData['service']['is_enable_advance_payment'] == 1 && $bookingData['booking_detail']['status'] !== 'cancelled' && ($bookingData['booking_detail']['payment_status'] == 'failed' || $bookingData['booking_detail']['payment_status'] == 'pending'))) {{ __('landingpage.pay_advance') }} @endif @if ( $bookingData['service']['visit_type'] == 'ONLINE' && $bookingData['booking_detail']['status'] == 'completed' && ($bookingData['booking_detail']['payment_id'] == null || $bookingData['booking_detail']['payment_status'] == 'failed' || $bookingData['booking_detail']['payment_status'] == 'pending')) {{ __('landingpage.pay_now') }} @endif
    @php $bookingRating = App\Models\BookingRating::where( 'booking_id', $bookingData['booking_detail']['id'], ) ->where('customer_id', auth()->user()->id) ->first(); if (!empty($bookingRating)) { $bookingRating->display_name = $bookingRating->customer->display_name; $bookingRating->profile_image = getSingleMedia( $bookingRating->customer, 'profile_image', null, ); $bookingRating->date = date( $date_time['date_format'], strtotime($bookingRating->created_at), ); } @endphp @if ($bookingData['booking_detail']['status'] == 'completed') @endif @if (count($bookingData['rating_data']) !== 0)
    {{ count($bookingData['rating_data']) }} {{ __('landingpage.review_for') }} {{ $bookingData['booking_detail']['service_name'] }}
      @php $counter = 1; @endphp @foreach ($bookingData['rating_data'] as $ratingData)
    • @if ($counter % 2 == 0)
      • @endif
        comment-user
        {{ date($date_time['date_format'], strtotime($ratingData['created_at'])) }}

        {{ $ratingData['review'] }}

        @if ($counter % 2 == 0)
      @endif
    • @php $counter++; @endphp @endforeach
    @endif
    {{-- tax modal --}} @endsection @section('after_script') @endsection