{{ 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_placed')}} {{ $bookingdata->date ?? '-'}}
{{__('messages.amount')}} : {{!empty($bookingdata->total_amount) ? getPriceFormat($bookingdata->total_amount): 0}}
{{ optional($bookingdata->customer)->contact_number ?? '-' }}
{{ optional($bookingdata->customer)->address ?? '-' }}
| {{__('messages.title')}} | {{__('messages.price')}} | {{__('messages.quantity')}} | {{__('messages.total_amount')}} |
|---|---|---|---|
| {{getPriceFormat($chrage->price)}} | {{$chrage->qty}} | {{getPriceFormat($chrage->price * $chrage->qty)}} |
| {{__('messages.service')}} | {{__('messages.price')}} | {{__('messages.discount')}} | {{__('messages.sub_total')}} |
|---|---|---|---|
| {{ isset($bookingdata->amount) ? getPriceFormat($bookingdata->amount) : 0 }} | {{!empty($bookingdata->discount) ? $bookingdata->discount : 0}}% | @php if($bookingdata->service->type === 'fixed'){ $sub_total = ($bookingdata->amount) * ($bookingdata->quantity); }else{ $sub_total = $bookingdata->amount; } @endphp{{!empty($sub_total) ? getPriceFormat($sub_total) : 0}} |
| {{__('messages.tax')}} | @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{{!empty($tax_amount) ? getPriceFormat($tax_amount) : 0}} |
| {{__('messages.subtotal_vat')}} | @php $sub_total = $bookingdata->amount + $tax_amount; @endphp{{!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}} |