@extends('layouts.report_pdf') @section('title') {{__('Delegate manager')}}-{{$data['manager']['name']}}-{{date('Y-m-d')}} @endsection @section('content')
{{-- --}} {{__('Delegate manager report')}} {{__('Delegate')}} : {{$data['manager']['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')}} {{__('Laboratory')}} {{__('Delegate')}} {{__('Patient Name')}} {{__('Tests')}} {{__('Total')}} {{__('Paid')}} {{__('Due')}} {{__('Commission')}} {{__('Commission paid')}} {{__('Commission balance')}}
{{$invoice['id']}} @if($invoice['canceled']) @else @endif {{date('d-m-Y H:i',strtotime($invoice['created_at']))}} @if(isset($invoice['from_laboratory'])) {{$invoice['from_laboratory']['name']}} @endif @if(isset($invoice['sample_collector'])) {{$invoice['sample_collector']['name']}} @endif {{$invoice['patient']['name']}} @foreach($invoice['tests'] as $test) @endforeach @foreach($invoice['cultures'] as $culture) @endforeach @foreach($invoice['packages'] as $package) @endforeach
@if(isset($test['test'])) {{$test['test']['name']}} @endif {{format_money($test['price'])}}
@if(isset($culture['culture'])) {{$culture['culture']['name']}} @endif {{format_money($culture['price'])}}
    @foreach($package['tests'] as $test)
  • @if(isset($test['test'])) {{$test['test']['name']}} @endif
  • @endforeach @foreach($package['cultures'] as $culture)
  • @if(isset($culture['culture'])) {{$culture['culture']['name']}} @endif
  • @endforeach
{{format_money($package['price'])}}
{{format_money($invoice['total'])}} {{format_money($invoice['paid'])}} {{format_money($invoice['due'])}} {{format_money($invoice['manager_commission'])}} {{format_money($invoice['manager_commission_paid'])}} {{format_money($invoice['manager_commission_due'])}}
@endif @if(count($data['payments'])&&request()->has('print.payments')) @foreach($data['payments'] as $payment) @endforeach
{{__('Payments')}}
{{__('Laboratory')}} {{__('Invoice no.')}} {{__('Cashier')}} {{__('Date')}} {{__('Amount')}} {{__('Payment method')}}
@if(isset($payment['invoice'])&&isset($payment['invoice']['from_laboratory'])) {{$payment['invoice']['from_laboratory']['name']}} @endif {{$payment['invoice_id']}} @if(isset($payment['user'])) {{$payment['user']['name']}} @endif {{$payment['date']}} {{format_money($payment['amount'])}} @if(isset($payment['payment_method'])) {{$payment['payment_method']['name']}} @endif
@endif @if(count($data['payouts'])&&request()->has('print.payouts')) @foreach($data['payouts'] as $payout) @endforeach
{{__('Payouts')}}
# {{__('Date')}} {{__('Amount')}} {{__('Payment method')}}
{{$payout['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')) @foreach($data['tests_statistics'] as $test) @endforeach
{{__('Tests')}}
{{__('Name')}} {{__('Count')}} {{__('Total')}}
{{$test['test_name']}} {{$test['count']}} {{$test['total']}}
@endif --}} {{-- @if(count($data['cultures_statistics'])&&request()->has('print.cultures_statistics')) @foreach($data['cultures_statistics'] as $culture) @endforeach
{{__('Cultures')}}
{{__('Name')}} {{__('Count')}} {{__('Total')}}
{{$culture['culture_name']}} {{$culture['count']}} {{$culture['total']}}
@endif --}} {{-- @if(count($data['packages_statistics'])&&request()->has('print.packages_statistics')) @foreach($data['packages_statistics'] as $package) @endforeach
{{__('Packages')}}
{{__('Name')}} {{__('Count')}} {{__('Total')}}
{{$package['package_name']}} {{$package['count']}} {{$package['total']}}
@endif --}} @if(request()->has('print.summary'))
{{__('Summary')}}
getLocale()=='ar') align="right" @else align="left" @endif>{{__('Invoices total')}} {{format_money($data['total'])}}
getLocale()=='ar') align="right" @else align="left" @endif>{{__('Paid')}} {{format_money($data['paid'])}}
getLocale()=='ar') align="right" @else align="left" @endif>{{__('Due')}} {{format_money($data['total'])}}
getLocale()=='ar') align="right" @else align="left" @endif>{{__('Total commissions')}} {{format_money($data['commission'])}}
getLocale()=='ar') align="right" @else align="left" @endif>{{__('Commissions paid')}} {{format_money($data['commission_paid'])}}
getLocale()=='ar') align="right" @else align="left" @endif>{{__('Commissions balance')}} {{format_money($data['commission_due'])}}
@endif @endsection