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

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

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

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

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

@if (!empty(optional($bookingdata->payment)->payment_type))
{{ optional($bookingdata->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')}} :
{{ ucwords(str_replace('_', ' ', optional($bookingdata->payment)->payment_status ?: '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')}}

{{__('messages.service')}} {{__('messages.price')}} {{__('messages.quantity')}} {{__('messages.sub_total')}}
{{ isset($bookingdata->amount) ? getPriceFormat($bookingdata->amount) : 0 }} {{!empty($bookingdata->quantity) ? $bookingdata->quantity : 0}} {{getPriceFormat($bookingdata->final_total_service_price)}}
@if($bookingdata->bookingPackage == null && $bookingdata->discount > 0) @endif @if($bookingdata->couponAdded != null) @endif @php // Calculate subtotal $subTotal = $bookingdata->amount * $bookingdata->quantity; // Apply discount if ($bookingdata->discount > 0) { $subTotal -= $bookingdata->final_discount_amount; } // Apply coupon discount if ($bookingdata->couponAdded != null) { $subTotal -= $bookingdata->final_coupon_discount_amount; } // Calculate tax $taxAmount = 0; if ($bookingdata->tax != "") { $taxData = json_decode($bookingdata->tax); $tax_per = 0; $tax_fix = 0; foreach ($taxData as $value) { if ($value->type === 'percent') { $tax_per = $subTotal * $value->value / 100; } else { $tax_fix = $value->value; } } $taxAmount = $tax_per + $tax_fix; } // Calculate extra charges and add-ons $extraCharges = $bookingdata->bookingExtraCharge->count() > 0 ? $bookingdata->getExtraChargeValue() : 0; $addonTotalPrice = $bookingdata->bookingAddonService->count() > 0 ? $bookingdata->bookingAddonService->sum('price') : 0; // Calculate totals $subTotalWithTax = $subTotal + $taxAmount + $extraCharges + $addonTotalPrice; $grandTotal = $subTotalWithTax; @endphp @if($extraCharges > 0) @endif @if($addonTotalPrice > 0) @endif @if($bookingdata->service->is_enable_advance_payment == 1) @endif
{{ __('messages.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.subtotal_vat') }} {{ getPriceFormat($subTotal) }}
{{ __('messages.extra_charge') }} +{{ getPriceFormat($extraCharges) }}
{{ __('messages.add_ons') }} +{{ getPriceFormat($addonTotalPrice) }}
{{ __('messages.tax') }} ({{ $bookingdata->tax_rate }}%) {{ getPriceFormat($taxAmount) }}
{{ __('messages.grand_total') }}

{{ getPriceFormat($grandTotal) }}

{{ __('messages.advance_payment_amount') }} ({{ $bookingdata->service->advance_payment_amount }}%) {{ getPriceFormat($bookingdata->advance_paid_amount) }}
{{ __('messages.remaining_amount') }} @if(optional($bookingdata->payment)->payment_status == 'paid') {{ __('messages.paid') }} @else {{ __('messages.pending') }} @endif {{ getPriceFormat($grandTotal - $bookingdata->advance_paid_amount) }}