@csrf

@if(isset($gst_status) && $gst_status != 0) Tax Invoice @else Invoice @endif

ABN: {{$appointment->practitioner->bankDetail->abn ?? ""}}

@if($invoiceSettings->company_name==1)

{{$appointment->practitioner->businessProfile->name ?? ""}}

@endif @if(isset($invoiceSettings) && $invoiceSettings->is_replace_business_address==1)

{{ $invoiceSettings->address1.', '.$invoiceSettings->address2.', '.$invoiceSettings->suburb.', '.$invoiceSettings->state.', '.$invoiceSettings->postcode.', '.$invoiceSettings->country }}

@else @if($invoiceSettings->address==1)

{{$appointment->locations->address ?? ""}}

@endif @endif @if($invoiceSettings->phone_number==1)

{{$appointment->practitioner->businessProfile->office_phone ?? ""}}

@endif @if($invoiceSettings->email==1)

{{$appointment->practitioner->businessProfile->email ?? ""}}

@endif @if($invoiceSettings->website==1)

{{$appointment->practitioner->businessProfile->website ?? ""}}

@endif

Invoice number:

{{$invoiceNumber}}

Invoice date:

{{$appointment->date->format('d/m/y')}}

@php $header_discount = 0; @endphp @if($eii) @foreach($eii as $tid) @php $header_discount += $tid->item_discount; @endphp @endforeach @endif @if($eiP) @foreach($eiP as $prod) @php $header_discount += $prod->product_discount; @endphp @endforeach @endif @if($packagesData) @foreach( $packagesData as $package ) @php $header_discount += $package->package_discount; @endphp @endforeach @endif @if($header_discount > 0) @endif @php $total=0; $maintotal=0; $totalgst = 0; $total_discount = 0; $totalgstItem = 0; $totalgst1Item = 0; $appPrice=0; $productPrice=0; $GST_Text = ""; $gst =0; $item_discount = 0; @endphp @isset($existinvoice) @if($eiP) @foreach($eiP as $prod) @if($prod->product_iteams) @php $maintotal += $prod->deduct_quantity * $prod->product_cost; @endphp @if(isset($prod->product_iteams->is_gst) && $prod->product_iteams->is_gst == 'on') {{-- GST FOR MULTIPLE QTY --}} @php $grandTotalGst = 0; @endphp @php $totalgst1Item += ($prod->deduct_quantity * $prod->product_cost) - $prod->product_discount; $item_discount += $prod->product_discount; $GST_Text = "10%"; @endphp @else @php $totalgst1Item += 0; $item_discount += $prod->product_discount; $GST_Text = "FREE"; @endphp @endif @if ($prod->product_discount > 0) @else @if($header_discount > 0) @endif @endif @php $totalgst += $totalgst1Item; $total_discount += $prod->product_discount; @endphp {{-- --}} @endif @endforeach @endif @if($eii) @foreach($eii as $tid) @if($tid->appointment_type) @php $total += $tid->app_cost * $tid->item_qty; @endphp @if(isset($tid->appointment_type->is_gst) && $tid->appointment_type->is_gst == 'on') {{-- GST FOR MULTIPLE QTY --}} @if($tid->item_qty==1) @php $appPrice= preg_replace("/[^0-9.]/", "", $tid->app_cost ?? 0.00); @endphp @else @php $quantity = isset($tid->item_qty) ? $tid->item_qty : 1; $appPrice= preg_replace("/[^0-9.]/", "", $tid->app_cost * $quantity ?? 0.00 ) - $tid->item_discount; @endphp @endif @php $totalgstItem += ($tid->app_cost * $tid->item_qty) - $tid->item_discount; $item_discount += $tid->item_discount; $GST_Text = "10%"; @endphp @else @php $totalgstItem += 0; $item_discount += $tid->item_discount; $GST_Text = "FREE"; @endphp @endif @if($tid->item_discount > 0) @else @if($header_discount > 0) @endif @endif @php $totalgst += $totalgstItem; $total_discount += $tid->item_discount; @endphp {{-- --}} {{-- {{dd($tid)}} --}} @endif @endforeach @endif @if($packagesData) @foreach($packagesData as $tid) @if($tid->package_id) @php $total += $tid->package_cost * $tid->package_quantity; @endphp @if(isset($tid->is_gst) && $tid->is_gst == 'on') @if($tid->package_quantity==1) @php $appPrice= preg_replace("/[^0-9.]/", "", $tid->package_cost ?? 0.00); @endphp @else @php $quantity = isset($tid->package_quantity) ? $tid->package_quantity : 1; $appPrice= preg_replace("/[^0-9.]/", "", $tid->package_cost * $quantity ?? 0.00 ) - $tid->package_discount; @endphp @endif @php $totalgstItem += ($tid->package_cost * $tid->package_quantity) - $tid->package_discount; $item_discount += $tid->package_discount; $GST_Text = "10%"; @endphp @else @php $totalgstItem += 0; $item_discount += $tid->package_discount; $GST_Text = "FREE"; @endphp @endif @if($tid->package_discount > 0) @else @if($header_discount > 0) @endif @endif @php $totalgst += $totalgstItem; $total_discount += $tid->package_discount; @endphp @endif @endforeach @endif @else {{-- {{dd($appointment->discount)}} --}} @if(isset($appointment->appointment_type->is_gst) && $appointment->appointment_type->is_gst == 'on') @php $GST_Text = '10%'; $totalgst += number_format((($appointment->appointment_type->fee - $appointment->item_discount) / 11), 2); @endphp @else @php $GST_Text = 'FREE'; $totalgst = 0; @endphp @endif @if($appointment->item_discount > 0) {{-- @else --}} @endif @php $total_discount += $appointment->item_discount; @endphp {{-- --}} @endisset
Description Item # CostDiscountGST Price
* {{$prod->product_iteams->product_name}} {{"x"}} {{$prod->deduct_quantity}}{{$prod->product_iteams->product_name}} {{"x"}} {{$prod->deduct_quantity}}{{$prod->product_iteams->product_code}} ${{number_format($prod->product_cost,2)}} ${{number_format($prod->product_discount,2)}} {{ $GST_Text }} ${{number_format($totalgst1Item,2)}} ${{number_format($prod->deduct_quantity * $prod->product_cost - $prod->product_discount,2)}}
* {{$tid->appointment_type->appointment_type ?? ""}} {{"x"}} {{$tid->item_qty}}{{$tid->appointment_type->appointment_type ?? ""}} {{"x"}} {{$tid->item_qty}}{{$tid->appointment_type->code}} ${{number_format($tid->app_cost,2)}}${{number_format($tid->item_discount,2)}}{{ $GST_Text }}${{number_format($totalgstItem,2)}}${{number_format(($tid->app_cost * $tid->item_qty) - $tid->item_discount,2)}}
* {{$tid->package->package_name ?? ""}} {{"x"}} {{$tid->package_quantity}}{{$tid->package->package_name ?? ""}} {{"x"}} {{$tid->package_quantity}} ${{number_format($tid->package_cost,2)}}${{number_format($tid->package_discount,2)}}{{ $GST_Text }} ${{number_format(($tid->package_cost * $tid->package_quantity) - $tid->package_discount,2)}}
* {{$appointment->appointment_type->appointment_type}}{{$appointment->appointment_type->appointment_type}}{{$appointment->code}} ${{number_format($appointment->appointment_type->fee,2)}}${{number_format($appointment->item_discount,2)}}{{ $GST_Text }}${{number_format($totalgstItem,2)}}${{number_format(($appointment->appointment_type->fee) - $appointment->item_discount,2)}}
@if(isset($existinvoice) && $existinvoice->discount !='' && $existinvoice->discount !='0.00')
@if(isset($existinvoice->is_coupon_applied) && $existinvoice->is_coupon_applied == 1 )

Coupon applied:

@else

Discount:

@endif

@if(isset($existinvoice->discount)) @if(isset($existinvoice->is_coupon_applied) && $existinvoice->is_coupon_applied == 1 )-@endif ${{ $existinvoice->discount }} @else $0.00 @endif

@endif

Invoice total:

@isset($existinvoice)

${{number_format($existinvoice->total,2)}}

@else

{{"$".number_format($appointment->appointment_type->fee,2)}}

@endisset
{{-- @if($total_discount > 0)

Discount:

${{$total_discount}}

@endif --}}
@if(isset($existinvoice)) @php $paymentMethod = ""; $amountPaid = 0; if(isset($existinvoice)) { $amountPaid = $existinvoice->amount_paid; $total = isset($existinvoice->total) ? $existinvoice->total : '0.00'; $amount_paid = isset($existinvoice->amount_paid) ? $existinvoice->amount_paid : '0.00'; $feee = $total - $amount_paid; $paymentMethod = $existinvoice->paymentType['name']; } else{ $amountPaid = '0.00'; } @endphp @if($amount_paid > 0) @foreach ($payment_list as $payment)

{{$payment->name}} @if(isset($payment->created_at)){{$payment->created_at->format('d/m/y')}}@endif:

@if($payment->payment_type ==12)-@endif${{$payment->paid_amount}}

@endforeach @endif @endif

Amount to pay:

@php if(isset($existinvoice)){ $total = isset($existinvoice->total) ? $existinvoice->total : '0.00'; $amount_paid = isset($existinvoice->amount_paid) ? $existinvoice->amount_paid : '0.00'; $feee = $total - $amount_paid; //$feee = $existinvoice->total; }else{ $feee = $appointment->appointment_type->fee; } if($clientpendingbalance){ if(($feee+$clientpendingbalance->client_pending_balance) <= 0 ){ $payableAmount = 0; }else{ $payableAmount = ($feee + $clientpendingbalance->client_pending_balance); } }else{ $payableAmount = $feee; } @endphp @php if(isset($existinvoice)) { $amountPaid = $existinvoice->amount_paid; $total = isset($existinvoice->total) ? $existinvoice->total : '0.00'; $amount_paid = isset($existinvoice->amount_paid) ? $existinvoice->amount_paid : '0.00'; $feee = $total - $amount_paid; } else{ $amountPaid = '0.00'; } if($depositPayment && $depositPaymentFee >= 1 && $amountPaid == '0.00') { if($dollar){ $feee = number_format($depositPaymentFee,2); } if($percentage) { $feee = $feee * $depositPaymentFee / 100; $feee = number_format($feee,2); } } @endphp

${{number_format($feee ,2) }}

{{--

Balance:

${{(isset($existinvoice) && $existinvoice != '') ? number_format(($totalInvoice = $existinvoice->total - $existinvoice->amount_paid),2) : '0.00'}}

--}} @php if(isset($existinvoice) && $existinvoice->discount > 0 && $item_discount == 0 ) { $discount_percentage = ($existinvoice->discount * 100) / ($total + $existinvoice->discount); $total_gst_amount = ($totalgstItem + $totalgst1Item) / 11; $gst = $total_gst_amount - (($total_gst_amount * $discount_percentage ) / 100); } else { if($totalgstItem == 0 && $totalgst1Item == 0) { $gst = $totalgst; } else { $gst = ($totalgstItem + $totalgst1Item) / 11; } } @endphp @if($gst != 0)

* Total GST:

${{ number_format($gst,2) }}

{{-- {{dd($totalgstItem , $totalgst1Item)}} --}} {{--@if( $use_new_gst == 1 )

${{number_format( $total_gst, 2) }}

@else @if($totalgst || $totalgst1)

${{number_format(($totalgstItem + $totalgst1Item) ,2) }}

@else @if($appointment->appointment_type->is_gst == 'on')

${{round($appointment->appointment_type->fee/11,2) ?? "0.00"}}

@endif @endif @endif--}}
@endif
@if(isset($invoiceSettings) && $invoiceSettings->invoice_notes == 1) @if(isset($existinvoice->notes) && $existinvoice->notes !='')
@elseif($invoiceSettings->invoice_notes_text !='')
@endif @endif
@if($merchantId) @endif

Secured payment

All transactions are secured & encrypted


Add a new card

Thank you

Your payment has been processed