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


{{ csrf_field() }}

{{__('texte.references_arr.promotion_products.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($index==0) @endif @if($index==0 || ($doc_rows[$index]->product_id!=$doc_rows[$index-1]->product_id)) @endif @if(isset($doc_rows[$index+1])) @if($doc_rows[$index]->producer!=$doc_rows[$index+1]->producer) @endif @else @endif @endforeach
{{__('texte.references_arr.promotion_products.group')}} {{__('texte.references_arr.promotion_products.code')}} {{__('texte.references_arr.promotion_products.article')}} {{!isset($input['print']) || $input['print']!=1 ? __('texte.references_arr.promotion_products.quantity') : __('texte.references_arr.promotion_products.quantity_short')}} {{__('texte.references_arr.promotion_products.base_value')}} {{__('texte.references_arr.promotion_products.sale_value')}} {{__('texte.references_arr.promotion_products.difference')}}
{{$doc_row->producer}}
{{$doc_row->category}} {{$doc_row->product_id}} {{$doc_row->name}} {{number_format($doc_rows->where('product_id',$doc_row->product_id)->sum('quantity'),0,'.',' ')}} {{number_format($doc_rows->where('product_id',$doc_row->product_id)->sum('base_value')*1.2,5,'.',' ')}} {{number_format($doc_rows->where('product_id',$doc_row->product_id)->sum('brochure_value')*1.2,5,'.',' ')}} {{number_format(($doc_rows->where('product_id',$doc_row->product_id)->sum('base_value')-$doc_rows->where('product_id',$doc_row->product_id)->sum('brochure_value'))*1.2,5,'.',' ')}}
{{$doc_row->document->documentable->contragent->company_name ?? $doc_row->document->documentable->contragent->user->name}} {{$doc_row->object_name}} {{$doc_row->quantity}} {{number_format($doc_row->base_value*1.2,5,'.','')}} {{number_format($doc_row->brochure_value*1.2,5,'.','')}} {{number_format(($doc_row->base_value-$doc_row->brochure_value)*1.2,5,'.','')}}
{{$doc_row->producer}} {{number_format($doc_rows->where('producer',$doc_row->producer)->sum('quantity'),0,'.',' ')}} {{number_format($doc_rows->where('producer',$doc_row->producer)->sum('base_value')*1.2,5,'.',' ')}} {{number_format($doc_rows->where('producer',$doc_row->producer)->sum('brochure_value')*1.2,5,'.',' ')}} {{number_format(($doc_rows->where('producer',$doc_row->producer)->sum('base_value')-$doc_rows->where('producer',$doc_row->producer)->sum('brochure_value'))*1.2,5,'.',' ')}}
{{$doc_rows[$index+1]->producer}}
{{$doc_row->producer}} {{number_format($doc_rows->where('producer',$doc_row->producer)->sum('quantity'),0,'.',' ')}} {{number_format($doc_rows->where('producer',$doc_row->producer)->sum('base_value')*1.2,5,'.',' ')}} {{number_format($doc_rows->where('producer',$doc_row->producer)->sum('brochure_value')*1.2,5,'.',' ')}} {{number_format(($doc_rows->where('producer',$doc_row->producer)->sum('base_value')-$doc_rows->where('producer',$doc_row->producer)->sum('brochure_value'))*1.2,5,'.',' ')}}
{{__('texte.references_arr.promotion_products.total')}} {{number_format($doc_rows->sum('quantity'),0,'.',' ')}} {{number_format($doc_rows->sum('base_value')*1.2,5,'.',' ')}} {{number_format($doc_rows->sum('brochure_value')*1.2,5,'.',' ')}} {{number_format(($doc_rows->sum('base_value') - $doc_rows->sum('brochure_value'))*1.2,5,'.',' ')}}
@endif
@if(!isset($input['print']) || $input['print']!=1) @endif @endsection