@extends('layouts.report_pdf') @section('title') {{__('Referral report')}}-{{$data['referral']['name']}}-{{date('Y-m-d')}} @endsection @section('content')
{{-- --}} {{__('Referral report')}} {{__('Referral')}} : {{$data['referral']['full_name']}}
{{__('Date')}} : {{date('Y-m-d H:i')}}
{{__('Date range')}} : {{date('Y-m-d H:i',strtotime($data['from']))}} - {{date('Y-m-d H:i',strtotime($data['to']))}}
@if(count($data['invoices'])&&request()->has('print.invoices')) {{-- --}} {{-- --}} @foreach($data['invoices'] as $invoice) {{-- --}} @endforeach
{{__('Invoices')}}
# {{__('Status')}} {{__('Date')}} {{__('Branch')}} {{__('Patient Name')}}{{__('Contract')}}{{__('Tests')}}{{__('Total')}} {{__('Commission')}} {{__('Paid')}} {{__('Due')}}
{{$invoice['id']}} @if($invoice['canceled']) @else @endif {{date('d-m-Y H:i',strtotime($invoice['created_at']))}} @if(isset($invoice['branch'])) {{$invoice['branch']['name_'.$locale]}} @endif @if(isset($invoice['patient'])) {{$invoice['patient']['name']}} @endif @if(isset($invoice['contract'])) {{$invoice['contract']['name']}} @endif @foreach($invoice['tests'] as $test) @endforeach @foreach($invoice['cultures'] as $culture) @endforeach @foreach($invoice['packages'] as $package) @endforeach
{{$test['test']['name']}} {{$test['price']}}
{{$culture['culture']['name']}} {{$culture['price']}}
{{$package['package']['name']}} {{$package['price']}}
{{format_money($invoice['total_for_commission'])}} {{format_money($invoice['referral_commission'])}} {{format_money($invoice['referral_paid'])}} {{format_money($invoice['referral_due'])}}
@endif @if(count($data['payouts'])&&request()->has('print.payouts')) @foreach($data['payouts'] as $payout) @endforeach
{{__('Payouts')}}
#{{__('Invoice')}} {{__('Date')}} {{__('Amount')}} {{__('Payment method')}}
{{$payout['invoice_id']}} {{date('d-m-Y',strtotime($payout['date']))}} {{format_money($payout['amount'])}} @if(isset($payout['payment_method'])) {{$payout['payment_method']['name']}} @endif
@endif @if(count($data['tests_statistics'])&&request()->has('print.tests_statistics')) @if(count($data['tests_statistics'])==0) @endif @foreach($data['tests_statistics'] as $test) @endforeach
{{__('Tests')}}
{{__('Name')}} {{__('Count')}} {{__('Total')}}
{{__('No data available')}}
{{$test['test_name']}} {{format_money($test['count'])}} {{format_money($test['total'])}}
@endif @if(count($data['cultures_statistics'])&&request()->has('print.cultures_statistics')) @if(count($data['cultures_statistics'])==0) @endif @foreach($data['cultures_statistics'] as $culture) @endforeach
{{__('Cultures')}}
{{__('Name')}} {{__('Count')}} {{__('Total')}}
{{__('No data available')}}
{{$culture['culture_name']}} {{format_money($culture['count'])}} {{format_money($culture['total'])}}
@endif @if(count($data['packages_statistics'])&&request()->has('print.packages_statistics')) @if(count($data['packages_statistics'])==0) @endif @foreach($data['packages_statistics'] as $package) @endforeach
{{__('Packages')}}
{{__('Name')}} {{__('Count')}} {{__('Total')}}
{{__('No data available')}}
{{$package['package_name']}} {{format_money($package['count'])}} {{format_money($package['total'])}}
@endif @if(request()->has('print.summary'))
{{__('Summary')}}
{{__('Total')}} {{format_money($data['total'])}}
{{__('Commissions')}} {{format_money($data['commission'])}}
{{__('Payouts')}} {{format_money($data['paid'])}}
{{__('Balance')}} {{format_money($data['due'])}}
@endif @endsection