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


{{ csrf_field() }}

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

@if(!isset($input['print']) || $input['print']!=1)
@endif
@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)) @if($doc_row->initial_balance!=0) @endif @endif @if(!isset($doc_rows[$index+1]) || $doc_rows[$index+1]->name!=$doc_rows[$index]->name || $doc_rows[$index+1]->contragent_name!=$doc_rows[$index]->contragent_name) @endif @if(!isset($doc_rows[$index+1]) || $doc_rows[$index+1]->contragent_name!=$doc_rows[$index]->contragent_name) @endif @endforeach
{{__('texte.references_arr.movements.intangible')}} {{__('texte.references_arr.movements.date')}} {{__('texte.references_arr.movements.number')}} {{__('texte.references_arr.movements.document')}} {{__('texte.references_arr.movements.value')}}
{{$doc_row->contragent_name}}
{{__('texte.references_arr.movements.initial_balance')}} {{number_format($doc_row->initial_balance,2,'.','')}}
{{$doc_row->name}} {{date('d.m.Y',strtotime($doc_row->date))}} {{$doc_row->number}} {{$doc_row->title}} {{number_format($doc_row->amount,2,'.','')}}
{{__('texte.references_arr.movements.total')}} {{$doc_row->name}}: {{number_format($doc_row->initial_balance + $doc_rows->where('contragent_name',$doc_row->contragent_name)->where('name',$doc_row->name)->sum('amount'),2,'.','')}}
{{__('texte.references_arr.movements.total_for')}} {{$doc_row->contragent_name}}: {{number_format($doc_row->initial_balance + $doc_rows->where('contragent_name',$doc_row->contragent_name)->sum('amount'),2,'.','')}}
{{__('texte.references_arr.movements.total')}}: {{number_format($doc_rows->unique('contrangent_name')->sum('initial_balance') + $doc_rows->sum('amount'),2,'.','')}}
@endif
@endsection