@section('externalcss') @endsection @if (\Illuminate\Support\Facades\Auth::user()->isAbleTo('reports-read') && \Illuminate\Support\Facades\Auth::user()->hasRole('admin'))
@if(sizeof($datatables)>0) Download Excel @endif
{{--
--}}
@if (sizeof($datatables) > 0) @foreach ($datatables as $key=>$table_data) @endforeach @endif
Billing Information
Sl No. Date Patient ID Patient Name Mobile Test Name Amt Disc(%) Net
{{$key+1}} {{\Carbon\Carbon::parse($table_data['created_at'])->format('d-m-y h:i A')}} {{$table_data['patient_id']}} {{$table_data['patient_name']}} {{$table_data['phone_no']}} {{$table_data['diagnosis_name']}} {{$table_data['net_amount']}} {{$table_data['disc_percentage']}} {{number_format((float)$table_data['discounted_net_amount'],2,'.','')}}
Total Amount {{number_format((float)$total_net, 2, '.', '')}} {{number_format((float)$total_paid, 2, '.', '')}}
Total Collection {{number_format((float)$total_collection_net, 2, '.', '')}}
@if (sizeof($datatables) > 0) @foreach ($datatables as $key=>$table_data) @endforeach @endif
   
Sl No Test Name
{{$key+1}} {{$table_data['diagnosis_name']}}
   
@if (sizeof($datatables) > 0) @foreach ($datatables as $key=>$table_data) @endforeach @endif
Doctor
Dr. Name Share(%) Amount Disc(%) Disc(Amt.) Net
{{$table_data['doctor_name'] != null?$table_data['doctor_name']:$table_data['unregistered_dr_name']}} {{$table_data['dr_percent']}} {{$table_data['dr_share_amount']}} {{$table_data['dr_disc_percent']}} {{$table_data['dr_disc_amount']}} {{$table_data['dr_amount']}}
Total Dr. Amount {{number_format((float)$total_dr_net, 2, '.', '')}}
@if (sizeof($datatables) > 0) @foreach ($datatables as $key=>$table_data) @endforeach @endif
Agent
A. Name Share(%) Amount
{{$table_data['agent_name']}} {{$table_data['agent_percent']}} {{$table_data['agent_amount']}}
Total Agent Amount {{number_format((float)$total_agent_net, 2, '.', '')}}
@if (sizeof($datatables) > 0) @foreach ($datatables as $key=>$table_data) @endforeach @endif
Lab
Share(%) Amount
{{$table_data['lab_percent']}} {{$table_data['lab_amount']}}
Total Lab Amount {{number_format((float)$total_lab_net, 2, '.', '')}}
@if (sizeof($datatables) > 0) @foreach ($datatables as $key=>$table_data) @endforeach @endif
Clinic
Share(%) Amount
{{$table_data['Clinic_percentage']}} {{$table_data['Clinic_amount']}}
Total Clinic Amount {{number_format((float)$total_clinic_net, 2, '.', '')}}
@if (sizeof($datatables) > 0) @foreach ($datatables as $key=>$table_data) @endforeach @endif
Pathololab
Pathologist Name Share(%) Amount
{{$table_data['pathology_name']}} {{$table_data['pathologist_percentage']}} {{$table_data['pathologist_amount']}}
Total Pathologist Amount {{number_format((float)$total_pathologist_net, 2, '.', '')}}
{{--
--}}{{-- --}}{{-- @if (sizeof($datatables) > 0) @foreach ($datatables as $key=>$table_data) @endforeach @else @endif
Diagnosis Amount Doctor Name & Percent Doctor Sharing Agent Name & Percent Agent SharingLab percentLab Sharing & percent Clinic Sharing & percent
{{ $table_data['diagnosis_name'] }} @if( $table_data['main_discount']>0){{$table_data['discounted_net_amount']}} @else{{$table_data['net_amount']}}@endif {{$table_data['dr_id'] != null ? $table_data['doctor_name'] : $table_data['unregistered_dr_name']}} @if($table_data['dr_percent']>0)
{{$table_data['dr_percent']}}%@endif
{{$table_data['dr_amount']}} @if($table_data['dr_percent']>0)
{{$table_data['dr_percent']}}%@endif
{{$table_data['agent_name'] != null ? $table_data['agent_name'] : 'NA'}} @if($table_data['agent_percent']>0)
{{$table_data['agent_percent']}}%@endif
{{$table_data['agent_amount']}}@if($table_data['agent_percent']>0)
{{$table_data['agent_percent']}}%@endif
{{$table_data['lab_amount']}}@if($table_data['lab_percent']>0)
{{$table_data['lab_percent']}}%@endif
{{$table_data['Clinic_amount']}}@if($table_data['Clinic_percentage']>0)
{{$table_data['Clinic_percentage']}}%@endif
No Data Available
--}}
@else

Sorry !!! Unauthorized Access

@endif @section('externaljs') @endsection