Date : {!! formatedDate(date('Y-m-d')) !!}

REFERRAL STATEMENT @if(!empty($labs) && isset( $labs->organization )) OF LAB {!! !empty($labs) && isset( $labs->organization ) ? $labs->organization : '' !!} @endif

Referral List From {!! formatedDate(date('Y-m-d', strtotime($start_date))) !!} TO {{formatedDate($end_date)}}

Time : {!! formatedTime(date('H:i:s')) !!}

@if($statement_by == 'patient') @endif @php $auth_format = \Session::get('company_data')['date_format'] ?? ''; @endphp @php $i=1; $total_comission = 0; @endphp @if(isset($data) && count($data)>0) @foreach($data as $key=> $row) {{-- --}} @if($statement_by == 'patient') @endif @php $amount = $row['sale_invoice_details']->basic_amount ?? 0 ; $discount = !empty($row['sale_invoice_details']->discount_amount) ? $row['sale_invoice_details']->discount_amount : (!empty($row['sale_invoice_details']->sale_discount_amount) ? $row['sale_invoice_details']->sale_discount_amount : '0'); $amount = $amount - $discount; $type = ''; $price = 0 ; if (isset($row['incentive_slab_details']) && !empty($row['incentive_slab_details']->calculation_type)) { $type = isset($row['incentive_slab_details']) && isset($row['incentive_slab_details']->calculation_type) ? $row['incentive_slab_details']->calculation_type : 0 ; $percentage = isset($row['incentive_slab_details']) && isset($row['incentive_slab_details']->percentage) ? $row['incentive_slab_details']->percentage : 0 ; $price = isset($row['incentive_slab_details']) && isset($row['incentive_slab_details']->price) ? $row['incentive_slab_details']->price : 0 ; } else if (!empty($incentive_slab) && !empty($incentive_slab->calculation_type)) { $type = $incentive_slab->calculation_type ?? '' ; $percentage = $incentive_slab->percentage ?? 0 ; $price = $incentive_slab->price ?? 0 ; } $commission = 0 ; $referral_count = $row['sale_invoice_details']->referral_count ?? 1 ; if ($type == 'quantity') { $commission = $referral_count * $price; } else if ($type == 'percentage') { $commission = ($percentage / 100) * $amount; } @endphp @php $i++; $total_comission += $commission; @endphp @endforeach @else @endif
Sl noInvoice No. Invoice Date Patient NameItem/Service Category Type Quantity Percentage Basic Amount Total Amount
{{ formatedDate($row['sale_invoice_details']->created_at) }} {{ $row['sale_invoice_details']->main_invoice_no }} {{ $row['sale_invoice_details']->patient_name }}
({{ $row['sale_invoice_details']->patient_code }})
{{ $i }}{{ $row['sale_invoice_details']->voucher_type_invoice_no }} {{ formatedDate($row['sale_invoice_details']->invoice_date) }} {{ $row['sale_invoice_details']->patient_title }} {{ $row['sale_invoice_details']->patient_name }}{{ $row['sale_invoice_details']->product }} {{ $row['sale_invoice_details']->brand }}{{ ucfirst($type) }} {{ $row['sale_invoice_details']->referral_count }} {{ !empty($percentage) ? $percentage.'%' : $price }} {{ $amount }} {{ $commission }}
Total {!! $total_comission !!}
No Data Found