@extends('layouts.report_pdf') @section('title') {{__('Supplier report')}}-{{$data['supplier']['id']}}-{{date('Y-m-d')}} @endsection @section('content')
{{-- --}} {{__('Supplier report')}} {{__('Supplier')}} : {{$data['supplier']['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['purchases'])&&request()->has('print.purchases')) @foreach($data['purchases'] as $purchase) @endforeach
{{__('Purchases')}}
# {{__('Date')}} {{__('Branch')}} {{__('Products')}} {{__('Total')}} {{__('Paid')}} {{__('Due')}}
{{$purchase['id']}} {{$purchase['date']}} @if(isset($purchase['branch'])) {{$purchase['branch']['name_'.app()->getLocale()]}} @endif @foreach($purchase['products'] as $product) @endforeach
{{__('Name')}} {{__('Unit price')}} {{__('Quantity')}} {{__('Total price')}}
@if(isset($product['product'])) {{$product['product']['name']}} @endif {{format_money($product['price'])}} {{format_money($product['quantity'])}} {{format_money($product['total_price'])}}
{{format_money($purchase['total'])}} {{format_money($purchase['paid'])}} {{format_money($purchase['due'])}}
@endif @if(count($data['payments'])&&request()->has('print.payments')) @foreach($data['payments'] as $payment) @endforeach
{{__('Payments')}}
# #{{__('Invoice')}} {{__('Date')}} {{__('Amount')}} {{__('Payment method')}}
{{$payment['id']}} {{$payment['purchase_id']}} {{$payment['date']}} {{format_money($payment['amount'])}} @if(isset($payment['payment_method'])) {{$payment['payment_method']['name']}} @endif
@endif @if(request()->has('print.summary'))
{{__('Summary')}}
{{__('Total')}}: {{format_money($data['total'])}}
{{__('Paid')}}: {{format_money($data['paid'])}}
{{__('Due')}}: {{format_money($data['due'])}}
@endif @endsection