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


{{ csrf_field() }}

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

@if(!isset($input['print']) || $input['print']!=1)
@endif
@include('references.filters.object_filters') @if(!isset($input['print']) || $input['print']!=1)
@endif
@if(isset($agent_realisations) && count($agent_realisations) > 0) @foreach($agent_realisations as $index=>$agent_realisation) @if($index==0 || ($index>0 && $agent_realisations[$index-1]->source!=$agent_realisation->source)) @endif @if($index==0 || ($index>0 && $agent_realisations[$index-1]->user_id!=$agent_realisation->user_id)) @endif @if($index==count($agent_realisations)-1 || $agent_realisations[$index+1]->user_id!=$agent_realisation->user_id) @endif @if($index==count($agent_realisations)-1 || $agent_realisations[$index+1]->source!=$agent_realisation->source) @endif @endforeach
{{__('texte.references_arr.realisation.client')}} {{__('texte.references_arr.realisation.object')}} {{__('texte.references_arr.realisation.delivery_date')}} {{__('texte.references_arr.realisation.in_tons')}} {{__('texte.references_arr.realisation.total_amount')}} {{__('texte.references_arr.realisation.count_orders')}} {{__('texte.references_arr.realisation.visitations')}}

{{__('texte.source_type_arr_text')[$agent_realisation->source]}}

{{$agent_realisation->user_name}}

{{$agent_realisation->contragent_name ?? $agent_realisation->contragent_name}} {{$agent_realisation->object_name}} {{date('d.m.Y',strtotime($agent_realisation->delivery_date))}} {{number_format($agent_realisation->total_weight,3,'.','')}} {{number_format($agent_realisation->total_amount,2,'.','')}}

{{__('texte.references_arr.realisation.total_for')}} {{$agent_realisation->user_name}}

{{number_format($agent_realisations->where('source',$agent_realisation->source)->where('user_id',$agent_realisation->user_id)->sum('total_weight'),3,'.','')}} {{number_format($agent_realisations->where('source',$agent_realisation->source)->where('user_id',$agent_realisation->user_id)->sum('total_amount'),2,'.','')}} {{count($agent_realisations->where('source',$agent_realisation->source)->where('user_id',$agent_realisation->user_id))}} {{$agent_realisations->where('source',$agent_realisation->source)->where('object',$agent_realisation->object)->unique('object')->sum('total_visitations')}}

{{__('texte.references_arr.realisation.total_for')}} {{__('texte.source_type_arr_text')[$agent_realisation->source]}}

{{number_format($agent_realisations->where('source',$agent_realisation->source)->sum('total_weight'),3,'.','')}} {{number_format($agent_realisations->where('source',$agent_realisation->source)->sum('total_amount'),2,'.','')}} {{count($agent_realisations->where('source',$agent_realisation->source))}} {{$agent_realisations->where('source',$agent_realisation->source)->unique('object')->sum('total_visitations')}}
{{__('texte.references_arr.realisation.total')}}: {{number_format($agent_realisations->sum('total_weight'),3,'.','')}} {{number_format($agent_realisations->sum('total_amount'),2,'.','')}} {{count($agent_realisations)}} {{$agent_realisations->unique('object')->sum('total_visitations')}}
@endif
@if(!isset($input['print']) || $input['print']!=1) @endif @endsection