@if(isset($data['phf']) && isset($data['chf'])) @endif
@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['logo']==1) @elseif(isset($data['invoiceSettings']) && $data['invoiceSettings']['logo']==0) @else @endif

{{$data['appointment']['practitioner']['full_name'] ?? ""}}

Registration number : {{$data['appointment']['practitioner']['registration_number'] ?? ""}}

{{$data['phf']['healthcodes']['name']}} : {{$data['phf']['provider_number']}}

Tax Invoice

ABN: {{$data['appointment']['practitioner']['bankDetail']['abn'] ?? ""}}

@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['company_name']==1)

{{$data['appointment']['practitioner']['businessProfile']['name'] ?? ""}}

@elseif(isset($data['invoiceSettings']) && $data['invoiceSettings']['company_name']==0) @else

{{$data['appointment']['practitioner']['businessProfile']['name'] ?? ""}}

@endif
@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['is_replace_business_address']==1)

{{$data['invoiceSettings']['address1'].', '. $data['invoiceSettings']['address2'].', '. $data['invoiceSettings']['suburb'].', '. $data['invoiceSettings']['state'].', '. $data['invoiceSettings']['postcode'].', '. $data['invoiceSettings']['country'] }}

@else @if(isset($data['invoiceSettings']) && $data['invoiceSettings']['address']==1)

{{$data['location']['address']}}

@endif @endif
@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['phone_number']==1)

{{$data['appointment']['practitioner']['businessProfile']['office_phone'] ?? ""}}

@elseif(isset($data['invoiceSettings']) && $data['invoiceSettings']['phone_number']==0) @else

{{$data['appointment']['practitioner']['businessProfile']['office_phone'] ?? ""}}

@endif
@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['email']==1)

{{$data['appointment']['practitioner']['businessProfile']['email'] ?? ""}}

@elseif(isset($data['invoiceSettings']) && $data['invoiceSettings']['email']==0) @else

{{$data['appointment']['practitioner']['businessProfile']['email'] ?? ""}}

@endif
@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['website']==1)

{{$data['appointment']['practitioner']['businessProfile']['website'] ?? ""}}

@elseif(isset($data['invoiceSettings']) && $data['invoiceSettings']['website']==0) @else

{{$data['appointment']['practitioner']['businessProfile']['website'] ?? ""}}

@endif

Bill to

{{$data['client']['full_name'] ?? ""}}

@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['client_email']==1)

{{$data['client']['email'] ?? ""}}

@elseif(isset($data['invoiceSettings']) && $data['invoiceSettings']['client_email']==0) @else

{{$data['client']['email'] ?? ""}}

@endif
@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['client_address']==1)

{{$data['client']['address'] ?? ""}}

@elseif(isset($data['invoiceSettings']) && $data['invoiceSettings']['client_address']==0) @else

{{$data['client']['address'] ?? ""}}

@endif
@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['client_dob']==1)

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

@elseif(isset($data['invoiceSettings']) && $data['invoiceSettings']['client_dob']==0) @else

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

@endif
Invoice number : {{$data['invoice']['invoice_number'] ?? ""}}
Invoice date : {{\Carbon\Carbon::parse($data['invoice']['date'])->format('d/m/y')}}
@php $total=0; $maintotal=0; $totalgst = 0; $totalgst1 = 0; @endphp @if($data['pii']) @foreach($data['pii'] 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 @else @endif @endif @endforeach @endif @if($data['pip']) @foreach($data['pip'] 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 @else @endif @endif @endforeach @endif
Description Code Price
* {{$tid->appointment_type->appointment_type}}{{$tid->appointment_type->appointment_type}}{{$tid->appointment_type->code}} ${{number_format($tid->app_cost,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->deduct_quantity * $prod->product_cost,2)}}

Total :

$ {{number_format($total + $maintotal,2) ?? "0.00"}}

{{$data['invoice']['paymentType']['name'] ?? ''}} {{$data['invoice']['created_at']->timezone(getAustraliaTimeZone())->format('d/m/y')}} :

$ {{number_format($data['invoice']['amount_paid'] , 2) ?? "0.00"}}

Balance :

$ {{ number_format($data['invoice']['account_balance'] , 2) ?? "0.00"}}

* Total GST :

@if( $data['use_new_gst'] == 1 )

$ {{ $data['total_gst'] }}

@else

$ {{round(($totalgst + $totalgst1) /11,2) ?? "0.00"}}

@endif
@if(isset($data['invoiceSettings']) && $data['invoiceSettings']['invoice_notes']==1) @endif

{!! nl2br(e($data['invoice']['notes'])) !!}