@extends('layouts.report_pdf') @section('title') {{__('Laboratory report')}}-{{$data['laboratory']['id']}}-{{date('Y-m-d')}} @endsection @section('content')
{{-- --}} {{__('Laboratory report')}} {{__('Laboratory')}} : {{$data['laboratory']['name']}}
@if($data['laboratory']['tax_no']) {{__('Tax No.')}} : {{$data['laboratory']['tax_no']}}
@endif {{__('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['sales_invoices'])&&request()->has('print.sales_invoices')) @foreach($data['sales_invoices'] as $invoice) @endforeach
{{__('Sales invoices')}}
# {{__('Status')}} {{__('Date')}} {{__('Patient Name')}} {{__('Tests')}} {{__('Subtotal')}} {{__('Discount')}} {{__('Tax')}} {{__('Total')}} {{__('Paid')}} {{__('Due')}}
{{$invoice['id']}} @if($invoice['canceled']) @else @endif {{date('Y-m-d H:i',strtotime($invoice['created_at']))}} @if(isset($invoice['patient'])) {{$invoice['patient']['name']}} @endif @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'])}}
@if(isset($package['package'])) {{$package['package']['name']}} @endif
    @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['subtotal'])}} {{format_money($invoice['discount'])}} {{format_money($invoice['tax'])}} {{format_money($invoice['total'])}} {{format_money($invoice['paid'])}} {{format_money($invoice['due'])}}
@endif @if(count($data['purchase_invoices'])&&request()->has('print.purchase_invoices')) @foreach($data['purchase_invoices'] as $invoice) @endforeach
{{__('Purchase invoices')}}
# {{__('Status')}} {{__('Date')}} {{__('Patient Name')}} {{__('Tests')}} {{__('Total')}} {{__('Paid')}} {{__('Due')}}
{{$invoice['id']}} @if($invoice['canceled']) @else @endif {{date('Y-m-d H:i',strtotime($invoice['created_at']))}} @if(isset($invoice['patient'])) {{$invoice['patient']['name']}} @endif @foreach($invoice['all_tests'] as $test) @endforeach @foreach($invoice['all_cultures'] as $culture) @endforeach
@if(isset($test['test'])) {{$test['test']['name']}} @endif {{format_money($test['to_lab_cost'])}}
@if(isset($culture['culture'])) {{$culture['culture']['name']}} @endif {{format_money($culture['to_lab_cost'])}}
@if(count($invoice['laboratory_costs'])) {{format_money($invoice['laboratory_costs'][0]['total'])}} @endif @if(count($invoice['laboratory_costs'])) {{format_money($invoice['laboratory_costs'][0]['paid'])}} @endif @if(count($invoice['laboratory_costs'])) {{format_money($invoice['laboratory_costs'][0]['due'])}} @endif
@endif @if(count($data['incoming_payments'])&&request()->has('print.payments')) @foreach($data['incoming_payments'] as $payment) @endforeach
{{__('Incoming payments')}}
{{__('Invoice')}} {{__('Date')}} {{__('Amount')}} {{__('Payment method')}}
{{$payment['invoice_id']}} {{$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')}}
{{__('Invoice')}} {{__('Date')}} {{__('Amount')}} {{__('Payment method')}}
{{$payout['invoice_id']}} {{$payout['date']}} {{format_money($payout['amount'])}} @if(isset($payout['payment_method'])) {{$payout['payment_method']['name']}} @endif
@endif @if(request()->has('print.sales_summary')) @endif @if(request()->has('print.purchase_summary')) @endif @if(request()->has('print.summary')) @endif
{{__('Summary')}}
{{__('Sales')}}
{{__('Total')}} {{format_money($data['sales_total'])}}
{{__('Paid')}} {{format_money($data['sales_paid'])}}
{{__('Due')}} {{format_money($data['sales_due'])}}
{{__('Purchases')}}
{{__('Total')}} {{format_money($data['purchase_total'])}}
{{__('Paid')}} {{format_money($data['purchase_paid'])}}
{{__('Due')}} {{format_money($data['purchase_due'])}}
{{__('Laboratory balance')}} {{format_money($data['laboratory_balance'])}}
@endsection