@extends('layouts.report_pdf') @section('title') {{__('Purchases report')}}-{{date('Y-m-d')}} @endsection @section('content')
{{-- --}} {{__('Purchases report')}} {{__('Date')}} : {{date('Y-m-d H:i')}}
{{__('Date range')}} : {{date('Y-m-d',strtotime($data['from']))}} - {{date('Y-m-d',strtotime($data['to']))}}
@if(count($data['purchases'])&&request()->has('print.purchases')) @foreach($data['purchases'] as $purchase) @endforeach
{{__('Purchases')}}
# {{__('Date')}} {{__('Supplier')}} {{__('Branch')}} {{__('Products')}} {{__('Total')}} {{__('Paid')}} {{__('Due')}}
{{$purchase['id']}} {{$purchase['date']}} @if(isset($purchase['supplier'])) {{$purchase['supplier']['name']}} @endif @if(isset($purchase['branch'])) {{$purchase['branch']['name_'.app()->getLocale()]}} @endif @foreach($purchase['products'] as $product) @endforeach
{{__('Name')}} {{__('Unit price')}} {{__('Quantity')}} {{__('Total price')}}
{{$product['product']['name']}} {{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')}} {{__('Supplier')}} {{__('Date')}} {{__('Amount')}} {{__('Payment method')}}
{{$payment['id']}} {{$payment['purchase_id']}} @if(isset($payment['purchase'])&&isset($payment['purchase']['supplier'])) {{$payment['purchase']['supplier']['name']}} @endif {{$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