@csrf

Tax Invoice

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

Bill to

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

{{$appointment->client->full_name ?? ""}}

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

{{$appointment->client->email ?? ""}}

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

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

{{$appointment->client->address2 ?? ""}}

{{$appointment->client->suburb_state_postcode ?? ""}}

{{$appointment->client->country ?? ""}}

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

@if(isset($appointment->client->date_of_birth)) DOB: {{$appointment->client->date_of_birth->format('d/m/Y')}} @else {{""}} @endif

@endif

Invoice number:

{{$invoiceNumber}}

Invoice date:

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

@php $total=0; $maintotal=0; $totalgst = 0; $totalgst1 = 0; $totalgstItem = 0; $totalgst1Item = 0; $appPrice=0; $productPrice=0; @endphp @isset($existinvoice) @if($eiP) @foreach($eiP as $prod) @if($prod->product_iteams) @php $maintotal += $prod->deduct_quantity * $prod->product_cost; @endphp @if($prod->product_iteams->is_gst == 'on') @php $totalgst1 += $prod->product_cost @endphp {{-- GST FOR MULTIPLE QTY --}} @for ($i=1;$i<= $prod->deduct_quantity;$i++) @php $totalgst1Item += ($prod->product_cost/11); @endphp @endfor @else @endif @endif @endforeach @endif @if($eii) @foreach($eii as $tid) @if($tid->appointment_type) @php $total += $tid->app_cost; @endphp @if($tid->appointment_type->is_gst == 'on') @php $totalgst += $tid->app_cost; @endphp {{-- GST FOR MULTIPLE QTY --}} @if($tid->item_qty==1) @php $appPrice= preg_replace("/[^0-9.]/", "", $tid->app_cost); @endphp @else @php $appPrice= preg_replace("/[^0-9.]/", "", $tid->app_cost)/$tid->item_qty; @endphp @endif @for ($i=1;$i<= $tid->item_qty;$i++) @php $totalgstItem += ($appPrice/11); @endphp @endfor @else @endif @endif @endforeach @endif @else @if($appointment->appointment_type->is_gst == 'on') @else @endif @endisset
Description Item # 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->deduct_quantity * $prod->product_cost,2)}}
* {{$tid->appointment_type->appointment_type ?? ""}}{{$tid->appointment_type->appointment_type ?? ""}}{{$tid->appointment_type->code}} ${{number_format($tid->app_cost,2)}}
* {{$appointment->appointment_type->appointment_type}}{{$appointment->appointment_type->appointment_type}}{{$appointment->appointment_type->code}} {{"$".$appointment->appointment_type->fee}}

Invoice total:

@isset($existinvoice)

${{$existinvoice->total}}

@else

{{"$".$appointment->appointment_type->fee}}

@endisset

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) }}

* Total GST:

@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
@if($merchantId) @endif
@if(isset($invoiceSettings) && $invoiceSettings->invoice_notes == 1) @if(isset($existinvoice->notes) && $existinvoice->notes !='')
@elseif($invoiceSettings->invoice_notes_text !='')
@endif @endif