@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.wrappage_sales.title3')}}
@if(!isset($input['print']) || $input['print']!=1) {{__('texte.references_arr.wrappage_sales.references')}} @endif


{{ csrf_field() }}

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

@if(!isset($input['print']) || $input['print']!=1)
@endif
@include('references.filters.object_filters') @include('references.filters.product_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 @if(!isset($doc_rows[$index+1]) || ($doc_rows[$index]->object_name!=$doc_rows[$index+1]->object_name)) @endif @if(!isset($doc_rows[$index+1]) || ($doc_rows[$index]->contragent_name!=$doc_rows[$index+1]->contragent_name)) @endif @endforeach
{{__('texte.references_arr.wrappage_sales.code')}} {{__('texte.references_arr.wrappage_sales.product')}} {{__('texte.references_arr.wrappage_sales.count')}} {{__('texte.references_arr.wrappage_sales.total_amount')}} {{__('texte.references_arr.wrappage_sales.average_price')}}
{{$doc_row->contragent_name}}
{{$doc_row->id}} {{$doc_row->name}} {{number_format($doc_row->quantity,0)}} {{number_format($doc_row->amount,2,'.','')}} {{number_format($doc_row->quantity!=0 ? $doc_row->amount/$doc_row->quantity : 0,5,'.','')}}
{{$doc_row->object_name}} {{count($doc_rows->where('contragent_name',$doc_row->contragent_name)->where('object_name',$doc_row->object_name))}} {{number_format($doc_rows->where('contragent_name',$doc_row->contragent_name)->where('object_name',$doc_row->object_name)->sum('quantity'),0,'.','')}} {{number_format($doc_rows->where('contragent_name',$doc_row->contragent_name)->where('object_name',$doc_row->object_name)->sum('amount'),2,'.','')}}
{{__('texte.references_arr.wrappage_sales.total_for')}} {{$doc_row->contragent_name}} {{count($doc_rows->where('contragent_name',$doc_row->contragent_name))}} {{number_format($doc_rows->where('contragent_name',$doc_row->contragent_name)->sum('quantity'),0,'.','')}} {{number_format($doc_rows->where('contragent_name',$doc_row->contragent_name)->sum('amount'),2,'.','')}}
{{__('texte.references_arr.wrappage_sales.total')}}: {{count($doc_rows)}} {{number_format($doc_rows->sum('quantity'),0,'.','')}} {{number_format($doc_rows->sum('amount'),2,'.','')}}
@endif
@if(!isset($input['print']) || $input['print']!=1) @endif @endsection