@extends(isset($input['print']) && $input['print']==1 ? 'layouts.general' : 'layouts.app') @section('link') @if(isset($input) && (!isset($input['print']) || $input['print']==1)) @endif @endsection @section('style') @endsection @section('content')
@include('shared.messages')

{{__('texte.references_arr.purchases.title2')}}
@if(!isset($input['print']) || $input['print']!=1) {{__('texte.references_arr.purchases.references')}} @endif


{{ csrf_field() }}

{{__('texte.references_arr.purchases.general_filters')}}

@if(!isset($input['print']) || $input['print']!=1)
@endif
@include('references.filters.document_filters') @if(!isset($input['print']) || $input['print']!=1)
@endif
@if(isset($doc_rows) && count($doc_rows) > 0) @foreach($doc_rows as $index=>$doc_row) @if($index==0 || ($index>0 && $doc_rows[$index]->contragent_name!=$doc_rows[$index-1]->contragent_name)) @endif @endforeach
{{__('texte.references_arr.purchases.supplier')}} {{__('texte.references_arr.purchases.document')}} {{__('texte.references_arr.purchases.in_tons')}} {{__('texte.references_arr.purchases.total_amount')}} {{__('texte.references_arr.purchases.count_buyings')}}
{{$doc_row->contragent_name}} {{number_format($doc_rows->where('contragent_name',$doc_row->contragent_name)->sum('total_weight')/1000,3,'.','')}} {{number_format($doc_rows->where('contragent_name',$doc_row->contragent_name)->sum('total_amount'),2,'.','')}} {{$doc_row->count_purchases}}
{{date('d.m.Y',strtotime($doc_row->date))}} | {{$doc_row->number}} {{$doc_row->title}} {{number_format($doc_row->total_weight/1000,3,'.','')}} {{number_format($doc_row->total_amount,2,'.','')}}
{{__('texte.references_arr.purchases.total')}}: {{count($doc_rows)}} {{number_format($doc_rows->sum('total_weight')/1000,3,'.','')}} {{number_format($doc_rows->sum('total_amount'),2,'.','')}} {{$doc_rows->unique('contragent_name')->sum('count_purchases')}}
@endif
@if(!isset($input['print']) || $input['print']!=1) @endif @endsection