@php $sitesetup = App\Models\Setting::where('type', 'site-setup')->where('key', 'site-setup')->first(); $datetime = $sitesetup ? json_decode($sitesetup->value) : null; @endphp {{ html()->hidden('id', $bookingdata->id ?? null) }}

{{ __('messages.book_id') }} {{ '#' . $bookingdata->id ?? '-' }}

@if ( $bookingdata->handymanAdded->count() == 0 && $bookingdata->status !== 'cancelled' && $bookingdata->status !== 'pending' && $bookingdata->status == 'accept') @hasanyrole('admin|demo_admin|provider') @endhasanyrole @endif
@if ( $bookingdata->handymanAdded->count() == 0 && $bookingdata->status !== 'cancelled' && $bookingdata->status == 'accept') @hasanyrole('admin|demo_admin|provider') {{ __('messages.assign_handyman') }} @endhasanyrole @endif
@if ($bookingdata->payment_id !== null) {{ __('messages.invoice') }} @endif

{{ __('messages.book_placed') }}

{{ date("$datetime->date_format $datetime->time_format", strtotime($bookingdata->created_at)) ?? '-' }}

{{ __('messages.booking_date') }}

{{ date("$datetime->date_format $datetime->time_format", strtotime($bookingdata->date)) ?? '-' }}

{{ __('messages.booking_status') }}

{{ App\Models\BookingStatus::bookingStatus($bookingdata->status) }}

{{ __('messages.total_amount') }}

{{ getPriceFormat($bookingdata->total_amount) }}

{{ __('messages.payment_method') }}

{{ isset($payment) ? ucfirst($payment->payment_type) : '-' }}

{{ __('messages.payment_status') }}

@if (isset($payment) && $payment->payment_status) @php $statusClass = match ($payment->payment_status) { 'paid', 'advanced_paid' => 'text-success', 'Advanced Refund' => 'text-warning', default => 'text-danger', }; @endphp

{{ str_replace('_', ' ', ucfirst($payment->payment_status)) }}

@else

{{ __('messages.pending') }}

@endif
@if ($serviceType === 'free')

{{ __('messages.service_type') }}

{{ __('landingpage.free') }}

@endif

{{ __('messages.service_name') }}

{{ $bookingdata->service->name }}

{{ __('messages.visit_type') }}

{{ $bookingdata->service->visit_type ? ucwords(str_replace('_', ' ', $bookingdata->service->visit_type)) : '-' }}

{{ __('messages.quantity') }}

{{ $bookingdata->quantity }}

{{--

{{ __('messages.amount') }}

{{ getPriceFormat($bookingdata->amount) }}

--}} @if ($bookingdata->status === 'cancelled')

{{ __('landingpage.cancel_reason') }}

{{ $bookingdata->reason ?? __('messages.no_reason_provided') }}

@endif
@if (isset($bookingdata->shop) && $bookingdata->shop !== null)
Provider Profile @if (optional($bookingdata->shop)->shop_attachment) Default Profile @endif

{{ __(key: 'messages.shop') }}

{{ optional($bookingdata->shop)->shop_name ?? '-' }}
@endif
Customer Profile @if (optional($bookingdata->customer)->profile_image) Default Profile @endif

{{ __('messages.customer') }}

{{ optional($bookingdata->customer)->display_name ?? '-' }}
Provider Profile @if (optional($bookingdata->provider)->profile_image) Default Profile @endif

{{ __('messages.provider') }} @if ( $bookingdata->handymanAdded->isNotEmpty() && $bookingdata->provider->id == optional($bookingdata->handymanAdded->first())->handyman->id) ({{ __('landingpage.as_handyman') }}) @endif

{{ optional($bookingdata->provider)->display_name ?? '-' }}
@if (count($bookingdata->handymanAdded) > 0) @foreach ($bookingdata->handymanAdded as $booking) @if (optional($bookingdata->provider)->id !== optional($booking->handyman)->id)
Handyman Profile @if (optional($booking->handyman)->profile_image) Default Profile @endif

{{ __('messages.handyman') }}

{{ optional($booking->handyman)->display_name ?? '-' }}
@endif @endforeach @endif

{{ __('messages.payment_summary') }}

@if ($bookingdata->service->type == 'hourly') @endif @if ($bookingdata->service->type == 'hourly') @else @endif @if ($bookingdata->bookingPackage == null && $bookingdata->discount > 0) @endif @if ($bookingdata->couponAdded != null) @endif @php // Calculate extra charges and add-ons $extraCharges = $bookingdata->bookingExtraCharge->count() > 0 ? $bookingdata->getExtraChargeValue() : 0; $addonTotalPrice = $bookingdata->bookingAddonService->count() > 0 ? $bookingdata->bookingAddonService->sum('price') : 0; @endphp @if ($extraCharges > 0) @endif @if ($addonTotalPrice > 0) @endif @if ($bookingdata->post_request_id == null) @else @endif @if ($bookingdata->service->is_enable_advance_payment == 1) @if ($bookingdata->status !== 'cancelled') @endif @if ($bookingdata->status === 'cancelled') @if ($bookingdata->advance_paid_amount > 0) @php $refundamount = $bookingdata->advance_paid_amount - $bookingdata->cancellation_charge_amount; @endphp @if ($refundamount > 0) @endif @endif @endif @endif
{{ __('messages.quantity') }} {{ $bookingdata->quantity }}
{{ __('landingpage.service_total_time') }} @php $formattedDuration = convertToHoursMins($bookingdata->duration_diff); @endphp {{ $formattedDuration }}
{{ __('messages.price') }} {{ getPriceFormat($bookingdata->amount) }} * {{ $bookingdata->quantity }} / hr = {{ getPriceFormat($bookingdata->final_total_service_price) }} {{ getPriceFormat($bookingdata->amount) }} * {{ $bookingdata->quantity }} = {{ getPriceFormat($bookingdata->amount * $bookingdata->quantity) }}
{{ __('messages.discount') }} ({{ $bookingdata->discount }}% off) -{{ getPriceFormat($bookingdata->final_discount_amount) }}
{{ __('messages.coupon') }} ({{ $bookingdata->couponAdded->code }}) -{{ getPriceFormat($bookingdata->final_coupon_discount_amount) }}
{{ __('messages.extra_charge') }} +{{ getPriceFormat($extraCharges) }}
{{ __('messages.add_ons') }} +{{ getPriceFormat($addonTotalPrice) }}
{{ __('messages.subtotal_vat') }} {{ getPriceFormat($bookingdata->final_sub_total) ?? 0 }}
{{ __('messages.tax') }} {{ getPriceFormat($bookingdata->final_total_tax) ?? 0 }}
{{ __('messages.subtotal_vat') }} {{ getPriceFormat($bookingdata->total_amount) ?? 0 }}
{{ __('messages.grand_total') }} {{ getPriceFormat($bookingdata->total_amount) ?? 0 }}
{{ __('messages.advance_payment_amount') }} ({{ $bookingdata->service->advance_payment_amount }}%) {{ getPriceFormat($bookingdata->advance_paid_amount) }}
{{ __('messages.remaining_amount') }} @if ($payment != null && $payment->payment_status !== 'paid') {{ __('messages.pending') }} @endif @if ($payment != null && $payment->payment_status == 'paid') {{ __('messages.paid') }} @else {{ getPriceFormat($bookingdata->total_amount - $bookingdata->advance_paid_amount) }} @endif
{{ __('messages.cancellation_charge') }} ({{ $bookingdata->cancellation_charge }}%) {{ getPriceFormat($bookingdata->cancellation_charge_amount) ?? 0 }}
{{ __('messages.refund_amount') }} {{ getPriceFormat($refundamount) ?? 0 }}
@if (count($bookingdata->bookingExtraCharge) > 0)

{{ __('messages.extra_charge') }}

@foreach ($bookingdata->bookingExtraCharge as $charge) @endforeach
{{ __('messages.title') }} {{ __('messages.price') }} {{ __('messages.quantity') }} {{ __('messages.total_amount') }}
{{ $charge->title }} {{ getPriceFormat($charge->price) }} {{ $charge->qty }} {{ getPriceFormat($charge->price * $charge->qty) }}
@endif @if ($bookingdata->bookingAddonService->count() > 0)

{{ __('messages.service_addon') }}

@foreach ($bookingdata->bookingAddonService as $addonservice) @php $addonTotalPrice += $addonservice->price; $addonTranslatedName = $addonservice->AddonserviceDetails->translate( 'name', app()->getLocale() ?? 'en', ); @endphp @endforeach
{{ __('messages.title') }} {{ __('messages.price') }} {{ __('messages.total_amount') }}
{{ getPriceFormat($addonservice->price) }} {{ getPriceFormat($addonservice->price) }}
@endif