@if( isset( $invoiceSettings ) && $invoiceSettings->practitioner_provider_number == 1 ) @if($invoice->practitioner->registration_number) @endif @elseif( isset( $invoiceSettings ) && $invoiceSettings->practitioner_provider_number == 0 ) @else @if($invoice->practitioner->registration_number) @endif @endif @if(isset($phf) && isset($chf)) @endif
@if(isset($invoiceSettings) && $invoiceSettings->logo==1) practitioner->businessProfile->logo) : '' }}' style="max-width: 200px; height: auto;" > @elseif(isset($invoiceSettings) && $invoiceSettings->logo==0) @else practitioner->businessProfile->logo) : '' }}' style="max-width: 200px; height: auto;" > @endif

{{$invoice->practitioner->full_name ?? ""}}

{{-- @if( isset( $invoiceSettings ) && $invoiceSettings->profession == 1 && isset($invoiceSettings->professionData)) --}} @if( isset( $invoiceSettings ) && $invoiceSettings->profession == 1 ) @endif

Registration number : {{$invoice->practitioner->registration_number ?? ""}}

Registration number : {{$invoice->practitioner->registration_number ?? ""}}

{{$phf->healthcodes->name ?? ""}} : {{$phf->provider_number ?? ""}}

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

Tax Invoice

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

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

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

@elseif(isset($invoiceSettings) && $invoiceSettings->company_name==0) @else

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

@endif

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

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

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

@elseif(isset($invoiceSettings) && $invoiceSettings->address==0) @else

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

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

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

@elseif(isset($invoiceSettings) && $invoiceSettings->phone_number==0) @else

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

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

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

@elseif(isset($invoiceSettings) && $invoiceSettings->email==0) @else

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

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

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

@elseif(isset($invoiceSettings) && $invoiceSettings->website==0) @else

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

@endif

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

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

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

@elseif(isset($invoiceSettings) && $invoiceSettings->client_name==0) @else

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

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

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

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

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

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

@elseif(isset($invoiceSettings) && $invoiceSettings->client_address==0) @else

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

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

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

@elseif(isset($invoiceSettings) && $invoiceSettings->client_dob==0) @else

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

@endif
Invoice number : {{$invoice->invoice_number ?? ""}}
Invoice date : @if($invoice->date){{\Carbon\Carbon::parse($invoice->date)->format('d/m/y')}}@endif
@php $header_discount = 0; @endphp @if($pii) @foreach( $pii as $tid ) @php $header_discount += $tid->item_discount; @endphp @endforeach @endif @if($pip) @foreach( $pip as $prod ) @php $header_discount += $prod->product_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; $totalgstItem = 0; $totalgst1Item = 0; $appPrice=0; $productPrice=0; $gst = 0; $item_discount = 0; @endphp @if($pii) @foreach($pii as $tid) @if($tid->appointment_type) @php $maintotal += preg_replace("/[^0-9.]/", "",$tid->app_cost * $tid->item_qty); @endphp @if($tid->appointment_type->is_gst == 'on') @php $totalgst += preg_replace("/[^0-9.]/", "",($tid->app_cost * $tid->item_qty) - $tid->item_discount); $GST_Text = "10%" @endphp {{-- GST FOR MULTIPLE QTY --}} @if($tid->item_qty==1) @php $appPrice= preg_replace("/[^0-9.]/", "", $tid->app_cost); $item_discount += $tid->item_discount; @endphp @else @php $appPrice= preg_replace("/[^0-9.]/", "", $tid->app_cost) / preg_replace("/[^0-9.]/", "", $tid->item_qty ?? '1'); @endphp @endif @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 @endforeach @endif @if($pip) @foreach($pip as $prod) @if($prod->product_iteams) @php $maintotal += $prod->deduct_quantity * preg_replace("/[^0-9.]/", "", $prod->product_cost); @endphp @if($prod->product_iteams->is_gst == 'on') @php $totalgst1 += preg_replace("/[^0-9.]/", "", ($prod->product_cost * $prod->deduct_quantity) - $prod->product_discount); $GST_Text = "10%"; $item_discount += $prod->product_discount; @endphp @else @php $item_discount += $prod->product_discount; $GST_Text = "FREE"; @endphp @endif @if($prod->product_discount > 0) @else @if($header_discount > 0) @endif @endif @endif @endforeach @endif @if($courseData) @if($courseData->course_id) @php $maintotal += 1 * preg_replace("/[^0-9.]/", "", $courseData->course_cost); @endphp @if($courseData->is_new_takings_gst == 1) @php $totalgst1 += preg_replace("/[^0-9.]/", "", $courseData->course_cost - $courseData->discount); $GST_Text = "10%"; $item_discount += $courseData->discount; @endphp @else @php $item_discount += $courseData->discount; $GST_Text = "FREE"; @endphp @endif @if($courseData->discount > 0) @else @if($header_discount > 0) @endif @endif @endif @endif
Description Code Cost Discount GST Price
* {{$tid->appointment_type->appointment_type}}{{$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(($tid->app_cost * $tid->item_qty - $tid->item_discount),2)}}
* {{$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}} ${{number_format(($prod->product_cost * $prod->deduct_quantity - $prod->product_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)}}
@if( $invoice->discount !='' && $invoice->discount !='0.00') @endif @if($historyinvoice) @foreach($historyinvoice as $hi) @endforeach @endif @php if($invoice->discount !='' && $invoice->discount !='0.00' && $item_discount == 0 ) { $discount_percentage = ($invoice->discount * 100) / $maintotal; $total_gst_amount = ($totalgst + $totalgst1) / 11; $gst = $total_gst_amount - (($total_gst_amount * $discount_percentage ) / 100); } else { $gst = ($totalgst + $totalgst1) / 11; } @endphp @if($gst != 0) @endif

Total :

${{number_format($maintotal ?? 0, 2) }}

Discount :

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

{{$hi->paymentType->name ?? ''}} {{$hi->created_at->format('d/m/y')}}

@if($hi->payment_type ==12) -@endif${{number_format($hi->paid_amount ,2) ?? '0.00'}}

Balance :

${{number_format( $invoice->account_balance, 2 ) ?? "0.00"}}

* Total GST :

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

{{-- @if( isset( $use_new_gst ) && $use_new_gst == 1 )

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

@else

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

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

{!! nl2br(e($invoice->notes)) !!}

@endif @endif