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


{{ csrf_field() }}

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

@if(!isset($input['print']) || $input['print']!=1)
@endif
@include('references.filters.product_filters') @include('references.filters.object_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(!isset($doc_rows[$index+1]) || ($doc_rows[$index]->product_name!=$doc_rows[$index+1]->product_name)) @endif @if(!isset($doc_rows[$index+1]) || ($doc_rows[$index]->category!=$doc_rows[$index+1]->category)) @endif @endforeach
{{__('texte.references_arr.sales.contragent')}} {{__('texte.references_arr.sales.object')}} {{__('texte.references_arr.sales.quantity')}} {{__('texte.references_arr.sales.in_kgs')}} {{__('texte.references_arr.sales.in_hl')}} {{__('texte.references_arr.sales.total_amount')}} {{__('texte.references_arr.sales.average_price')}} {{__('texte.references_arr.sales.orders')}}
{{$doc_row->contragent_name}} {{$doc_row->object_name}} {{number_format($doc_row->quantity,3)}} {{number_format($doc_row->total_weight,3,'.','')}} {{number_format($doc_row->volume,3)}} {{number_format($doc_row->total_amount,2,'.','')}} {{number_format($doc_row->quantity!=0 ? $doc_row->total_amount/$doc_row->quantity : 0,5,'.','')}} {{$doc_row->count_orders}}
{{$doc_row->product_name}} {{count($doc_rows->where('product_name',$doc_row->product_name))}} {{number_format($doc_rows->where('product_name',$doc_row->product_name)->sum('quantity'),3,'.','')}} {{number_format($doc_rows->where('product_name',$doc_row->product_name)->sum('total_weight'),3,'.','')}} {{number_format($doc_rows->where('product_name',$doc_row->product_name)->sum('volume'),3,'.','')}} {{number_format($doc_rows->where('product_name',$doc_row->product_name)->sum('total_amount'),2,'.','')}} {{number_format($doc_rows->where('product_name',$doc_row->product_name)->sum('quantity')!=0 ? $doc_rows->where('product_name',$doc_row->product_name)->sum('total_amount')/$doc_rows->where('product_name',$doc_row->product_name)->sum('quantity') : 0,5,'.','')}} {{$doc_rows->where('product_name',$doc_row->product_name)->sum('count_orders')}}
{{$doc_row->category}} {{count($doc_rows->where('category',$doc_row->category))}} {{number_format($doc_rows->where('category',$doc_row->category)->sum('quantity'),3,'.','')}} {{number_format($doc_rows->where('category',$doc_row->category)->sum('total_weight'),3,'.','')}} {{number_format($doc_rows->where('category',$doc_row->category)->sum('volume'),3,'.','')}} {{number_format($doc_rows->where('category',$doc_row->category)->sum('total_amount'),2,'.','')}} {{number_format($doc_rows->where('category',$doc_row->category)->sum('quantity')!=0 ? $doc_rows->where('category',$doc_row->category)->sum('total_amount')/$doc_rows->where('category',$doc_row->category)->sum('quantity') : 0,5,'.','')}} {{$doc_rows->where('category',$doc_row->category)->sum('count_orders')}}
{{__('texte.references_arr.sales.total')}}: {{count($doc_rows)}} {{number_format($doc_rows->sum('quantity'),3,'.','')}} {{number_format($doc_rows->sum('total_weight'),3,'.','')}} {{number_format($doc_rows->sum('volume'),3,'.','')}} {{number_format($doc_rows->sum('total_amount'),2,'.','')}} {{$doc_rows->sum('count_orders')}}
@endif
@if(!isset($input['print']) || $input['print']!=1) @endif @endsection