{{ Form::hidden('id',$bookingdata->id) }} @php $extraValue = 0; $attachments = optional($bookingdata->service)->getMedia('service_attachment'); if(!$attachments->isEmpty()){ $image = $attachments[0]->getFullUrl(); } else { $image = getSingleMedia(optional($bookingdata->service),'service_attachment'); } $status = App\Models\BookingStatus::where('status',1)->orderBy('sequence','ASC')->get()->pluck('label', 'value'); @endphp

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

{{__('messages.book_placed')}} {{ $bookingdata->date ?? '-'}}

@if($bookingdata->payment_id !== null) {{__('messages.invoice')}} @endif

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

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

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

{{__('messages.booking_status')}} :
{{ App\Models\BookingStatus::bookingStatus($bookingdata->status)}}
{{__('messages.booking_date')}} :
{{ $bookingdata->date ?? '-'}}

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

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

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

{{optional($bookingdata->provider)->display_name ?? '-'}}
@if($bookingdata->bookingExtraCharge->count() > 0 )

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

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

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

@php if($bookingdata->service->type === 'fixed'){ $sub_total = ($bookingdata->amount) * ($bookingdata->quantity); }else{ $sub_total = $bookingdata->amount; } @endphp
{{__('messages.service')}} {{__('messages.price')}} {{__('messages.discount')}} {{__('messages.sub_total')}}
{{ isset($bookingdata->amount) ? getPriceFormat($bookingdata->amount) : 0 }} {{!empty($bookingdata->discount) ? $bookingdata->discount : 0}}%{{!empty($sub_total) ? getPriceFormat($sub_total) : 0}}
@php if($bookingdata->tax != ""){ foreach(json_decode($bookingdata->tax) as $key => $value){ if($value->type === 'percent'){ $tax = $value->value; $tax_per = $sub_total * $tax / 100; }else{ $tax_fix = $value->value; } } $tax_amount = $tax_per ?? 0 + $tax_fix ?? 0; }else{ $tax_amount =0; } @endphp @php $sub_total = $bookingdata->amount + $tax_amount; @endphp @if($bookingdata->bookingExtraCharge->count() > 0 ) @endif
{{__('messages.tax')}}{{!empty($tax_amount) ? getPriceFormat($tax_amount) : 0}}
{{__('messages.subtotal_vat')}}{{!empty($sub_total) ? getPriceFormat($sub_total) : 0}}
{{__('messages.discount')}} (-) {{!empty($bookingdata->discount) ? $bookingdata->discount : 0}}%
{{__('messages.extra_charge')}} (+) {{getPriceFormat($extraValue)}}
{{__('messages.grand_total')}} @php $coupon_discount = $sub_total * (float)$discount / 100; $discount = $sub_total * $bookingdata->discount / 100; $total_amount = $sub_total - ($coupon_discount + $discount); @endphp

{{!empty($total_amount) ? getPriceFormat($total_amount + $extraValue) : 0}}