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


{{ csrf_field() }}

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

@if(!isset($input['print']) || $input['print']!=1)
@endif
@include('references.filters.object_filters') @include('references.filters.document_filters') @if(!isset($input['print']) || $input['print']!=1)
@endif
@if(isset($object_documents) && count($object_documents) > 0) @foreach($object_documents as $index=>$object_document) @if($index==0) @if($object_document->documentable_type==1) @else @endif @endif @if($index>0 && $object_documents[$index]->doc_id!=$object_documents[$index-1]->doc_id) @if($object_document->documentable_type==1) @else @endif @endif @if(!isset($object_documents[$index+1]) || (isset($object_documents[$index+1]) && $object_documents[$index]->id!=$object_documents[$index+1]->id)) @endif @if(!isset($object_documents[$index+1]) || (isset($object_documents[$index+1]) && $object_documents[$index]->contragent_id!=$object_documents[$index+1]->contragent_id)) @endif @if(isset($object_documents[$index+1]) && $object_documents[$index]->contragent_id!=$object_documents[$index+1]->contragent_id) @endif @endforeach
{{__('texte.references_arr.objects_payroll.object')}} {{__('texte.references_arr.objects_payroll.date')}} {{__('texte.references_arr.objects_payroll.payment_date')}} {{__('texte.references_arr.objects_payroll.type')}} {{__('texte.references_arr.objects_payroll.number')}} {{__('texte.references_arr.objects_payroll.amount')}} {{__('texte.references_arr.objects_payroll.paid')}} {{__('texte.references_arr.objects_payroll.dues')}}
{{$object_document->contragent_name}}
{{date("d.m.Y",strtotime($object_document->date))}} {{$object_document->payment_date!='' ? date("d.m.Y",strtotime($object_document->payment_date)) : ''}} {{$object_document->title}} {{$object_document->number}} {{number_format($object_document->total<0 ? 0 : $object_document->total,2,'.','')}} {{number_format($object_document->total<0 ? abs($object_document->total) : $object_document->paid,2,'.','')}} {{number_format($object_document->total - $object_document->paid,2,'.','')}}
{{$object_document->object_name}} {{date("d.m.Y",strtotime($object_document->date))}} {{$object_document->payment_date!='' ? date("d.m.Y",strtotime($object_document->payment_date)) : ''}} {{$object_document->title}} {{$object_document->number}} {{number_format($object_document->total<0 ? 0 : $object_document->total,2,'.','')}} {{number_format($object_document->total<0 ? abs($object_document->total) : $object_document->paid,2,'.','')}} {{number_format($object_document->total - $object_document->paid,2,'.','')}}
{{date("d.m.Y",strtotime($object_document->date))}} {{$object_document->payment_date!='' ? date("d.m.Y",strtotime($object_document->payment_date)) : ''}} {{$object_document->title}} {{$object_document->number}} {{number_format($object_document->total<0 ? 0 : $object_document->total ,2,'.','')}} {{number_format($object_document->total<0 ? abs($object_document->total) : $object_document->paid,2,'.','')}} {{number_format($object_document->total - $object_document->paid,2,'.','')}}
{{$object_document->user->name}} {{date("d.m.Y",strtotime($object_document->date))}} {{$object_document->payment_date!='' ? date("d.m.Y",strtotime($object_document->payment_date)) : ''}} {{$object_document->title}} {{$object_document->number}} {{number_format($object_document->total<0 ? 0 : $object_document->total,2,'.','')}} {{number_format($object_document->total<0 ? abs($object_document->total) : $object_document->paid,2,'.','')}} {{number_format($object_document->total - $object_document->paid,2,'.','')}}
{{__('texte.references_arr.objects_payroll.total_for')}} {{$object_document->object_name}}
{{number_format($object_documents->where('id',$object_document->id)->where('documentable_type',2)->where('total','>',0)->sum('total'),2,'.','')}} {{number_format($object_documents->where('id',$object_document->id)->where('documentable_type',2)->where('total','>',0)->sum('paid') + $object_documents->where('id',$object_document->id)->where('documentable_type',2)->where('total','<',0)->sum('total')*(-1),2,'.','')}} {{number_format($object_documents->where('id',$object_document->id)->where('documentable_type',2)->sum('total') - $object_documents->where('id',$object_document->id)->where('documentable_type',2)->sum('paid'),2,'.','')}}

{{__('texte.references_arr.objects_payroll.total_for')}} {{$object_document->contragent_name}}

{{number_format($object_documents->where('contragent_id',$object_document->contragent_id)->where('total','>',0)->sum('total'),2,'.','')}} {{number_format($object_documents->where('contragent_id',$object_document->contragent_id)->where('total','>',0)->sum('paid') + $object_documents->where('contragent_id',$object_document->contragent_id)->where('total','<',0)->sum('total')*(-1),2,'.','')}} {{number_format($object_documents->where('contragent_id',$object_document->contragent_id)->sum('total') - $object_documents->where('contragent_id',$object_document->contragent_id)->sum('paid'),2,'.','')}}
{{$object_documents[$index+1]->contragent_name}}
@endif
@if(!isset($input['print']) || $input['print']!=1) @endif @endsection