@csrf

Tax Invoice

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

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

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

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

{{$existinvoice->invoicelocation->address ?? ""}}

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

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

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

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

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

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

@endif

Invoice number:

{{$existinvoice->invoice_number}}

Invoice date:

{{$existinvoice->date->timezone(getAustraliaTimeZone())->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($courseData) @php $header_discount += $courseData->discount; @endphp @endif @if($header_discount > 0) @endif @php $total=0; $maintotal=0; $totalgst = 0; $totalgst1 = 0; $totalgst2 = 0; $totalgstItem = 0; $totalgst1Item = 0; $appPrice=0; $productPrice=0; $total_discount = 0; $gst = 0; $item_discount = 0; @endphp @isset($existinvoice) @if($eiP) @foreach($eiP as $prod) @if($prod->product_iteams) @if($prod->product_iteams->is_gst == 'on') {{-- GST FOR MULTIPLE QTY --}} @for ($i=1;$i<= $prod->deduct_quantity;$i++) @php $total2 = $prod->deduct_quantity * $prod->product_cost; $total2 = $total2 - $prod->product_discount; $item_discount += $prod->product_discount; $totalgst1Item = ($prod->deduct_quantity * $prod->product_cost) - $prod->product_discount; $GST_Text = "10%"; @endphp @endfor @else @php $GST_Text = "FREE"; $item_discount += $prod->product_discount; @endphp @endif @if($prod->product_discount > 0) @else @if($header_discount > 0) @endif @endif {{-- --}} @endif @php $totalgst1 += $totalgst1Item; $total_discount += $prod->product_discount; @endphp @endforeach @endif @if($eii) @foreach($eii as $tid) @if($tid->appointment_type) @php $total += preg_replace("/[^0-9.]/", "",$tid->app_cost); @endphp @if($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 ?? 0.00 )/$quantity; @endphp @endif @php $totalgstItem = (($tid->app_cost * $tid->item_qty) - $tid->item_discount); $item_discount += $tid->item_discount; $GST_Text = "10%"; @endphp @else @php $GST_Text = "FREE"; $item_discount += $tid->item_discount; @endphp @endif @if($tid->item_discount > 0) @else @if($header_discount > 0) @endif @endif {{-- --}} @endif @php $totalgst2 += $totalgstItem; $total_discount += $tid->item_discount; @endphp @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 @if( $courseData ) @if( $courseData->course_id ) @php $total += $courseData->course_cost; @endphp @if(isset($courseData->is_new_takings_gst) && $courseData->is_new_takings_gst == 1) @php $appPrice= preg_replace("/[^0-9.]/", "", $courseData->course_cost ?? 0.00); @endphp @php $totalgstItem += $courseData->course_cost - $courseData->discount; $item_discount += $courseData->discount; $GST_Text = "10%"; @endphp @else @php $totalgstItem += 0; $item_discount += $courseData->discount; $GST_Text = "FREE"; @endphp @endif @if( $courseData->discount > 0) @else @if($header_discount > 0) @endif @endif @php $totalgst += $totalgstItem; $total_discount += $courseData->discount; @endphp @endif @endif @endisset
Description Item # CostDiscountGST Price
* {{$prod->deduct_quantity}} {{"x"}} {{$prod->product_iteams->product_name}}{{$prod->deduct_quantity}} {{"x"}} {{$prod->product_iteams->product_name}}{{$prod->product_iteams->product_code}} ${{number_format($prod->product_cost,2)}} ${{number_format($prod->product_discount,2)}} {{ $GST_Text }} ${{$totalgst1Item}} ${{number_format($prod->deduct_quantity * $prod->product_cost - $prod->product_discount,2)}}
* {{$tid->appointment_type->appointment_type ?? ""}}{{$tid->item_qty}} {{"x"}} {{$tid->appointment_type->appointment_type ?? ""}}{{$tid->appointment_type->code}} ${{number_format($tid->app_cost,2)}}${{number_format($tid->item_discount,2)}}{{ $GST_Text }}${{number_format($totalgstItem,2)}}${{number_format( preg_replace("/[^0-9.]/", "", ($tid->app_cost * $tid->item_qty) - $tid->item_discount ?? 0.00),2) ?? "0.00"}}
* {{$tid->package->package_name ?? ""}}{{$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)}}
* {{$courseData->course->course_name ?? ""}}{{$courseData->course->course_name ?? ""}} ${{number_format($courseData->course_cost,2)}}${{number_format($courseData->discount,2)}}{{ $GST_Text }} ${{number_format(($courseData->course_cost) - $courseData->discount,2)}}

Invoice total:

${{number_format(($existinvoice->total + $existinvoice->discount),2) ?? "0.00" }}

@if($existinvoice->discount !='' && $existinvoice->discount !='0.00')

Discount:

${{number_format(($existinvoice->discount),2) ?? "0.00" }}

@endif
@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; $paymentMethod = $existinvoice->paymentType['name']; } else{ $amountPaid = '0.00'; } @endphp @if($amount_paid > 0) @foreach ($payment_list as $payment)

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

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

@endforeach @endif

Amount to pay:

@php if($existinvoice->invoice_pay_status =='pending') { $TOTAL = isset($existinvoice->total) ? $existinvoice->total : "0.00";} else{ $TOTAL = isset($existinvoice->account_balance) ? $existinvoice->account_balance : "0.00"; } @endphp

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

@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 { $gst = ($totalgstItem + $totalgst1Item) / 11; } @endphp @if($gst != 0)

* Total GST:

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

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