@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 ?? '-'}}

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

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

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

@if (!empty($payment->payment_type))
{{ $payment->payment_type }}
@else
-
@endif

{{__('messages.amount')}} : {{!empty($bookingdata->total_amount) ? getPriceFormat($bookingdata->total_amount): 0}}

{{__('messages.booking_status')}} : {{ App\Models\BookingStatus::bookingStatus($bookingdata->status)}} @if($bookingdata->status === "cancelled") {{__('messages.reason')}} : {{ $bookingdata->reason }} @endif
{{__('messages.payment_status')}} : {{ isset($payment) && $payment->payment_status == 'paid' ? 'Paid' : 'Pending'}}
{{__('messages.booking_date')}} :
{{ date("$datetime->date_format $datetime->time_format", strtotime($bookingdata->date)) ?? '-'}}

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

{{optional($bookingdata->customer)->display_name ?? '-'}}

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

{{optional($bookingdata->provider)->display_name ?? '-'}}
@if(count($bookingdata->handymanAdded) > 0)
@foreach($bookingdata->handymanAdded as $booking)

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

{{optional($booking->handyman)->display_name ?? '-'}}
@endforeach
@endif
@if($bookingdata->bookingExtraCharge->count() > 0 )

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

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

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

@foreach($bookingdata->bookingAddonService as $addonservice) @php $addonTotalPrice += $addonservice->price; @endphp @endforeach
{{__('messages.title')}} {{__('messages.price')}} {{__('messages.total_amount')}}
{{getPriceFormat($addonservice->price)}} {{getPriceFormat($addonservice->price)}}
@endif

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

@php $serviceamount = $bookingdata->amount ? $bookingdata->amount : 0; $quantity = $bookingdata->quantity ? $bookingdata->quantity : 1; $amounttotal = $serviceamount * $quantity; @endphp
{{__('messages.service')}} {{__('messages.price')}} {{__('messages.quantity')}} {{__('messages.sub_total')}}
{{ getPriceFormat($serviceamount) }} {{ $quantity }} {{ getPriceFormat($amounttotal) }}
@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->service->is_enable_advance_payment == 1) @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.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.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.paid') }} @else {{ __('messages.pending') }} @endif @if($payment != null && $payment->payment_status == 'paid') {{ getPriceFormat( ($bookingdata->total_amount - $bookingdata->advance_paid_amount )- $payment->total_amount) }} @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}}