@foreach($documents as $i => $document) @if($i>0)
@endif

{{$document->copy==1 ? __('texte.documents_arr.print.protocol') : (isset($document->short_title) ? $document->short_title : '')}}

@if($document->copy!=1)

( {{__('texte.documents_arr.print.original')}} )

@endif

{{$document->number.' / '.date("d.m.Y",strtotime($document->date))}}

{{$document->type->title}}


@if($document->copy!=1 && $document->parent_id!=0 && in_array($document->doc_type,array(4,12,22,63,65)))

{{($document->parent->doc_type==24 ? __('texte.documents_arr.print.to_case_order') : __('texte.documents_arr.print.to_invoice')).$document->parent->number.' / '.date("d.m.Y",strtotime($document->parent->date))}}

@endif @if($document->copy==1)

{!!$document->code!!}

{!!$document->id!!}

@endif
@if($document->type->documentable_type==2) @if(isset($document->order)) @endif @endif @if($document->type->wrappage_only==0) @else @endif
{{__('texte.documents_arr.print.contragent')}} : {{$document->type->documentable_type==1 ? ($document->documentable->company_name ?? $document->documentable->user->name) : $document->documentable->contragent->company_name ?? $document->documentable->contragent->user->name}} {{__('texte.documents_arr.print.supplier')}} : {{$document->storage->company_name ?? ''}}
{{__('texte.documents_arr.print.city')}} : {{$document->type->documentable_type==1 ? $document->documentable->location->name : $document->documentable->contragent->location->name}} {{__('texte.documents_arr.print.city')}} : {{$document->storage->companyLocation->name ?? ''}}
{{__('texte.documents_arr.print.address')}} : {{$document->type->documentable_type==1 ? $document->documentable->address : $document->documentable->contragent->address}} {{__('texte.documents_arr.print.address')}} : {{$document->storage->company_address ?? ''}}
{{__('texte.documents_arr.print.eik')}} : {{$document->type->documentable_type==1 ? $document->documentable->bulstat : $document->documentable->contragent->bulstat}} {{__('texte.documents_arr.print.eik')}} : {{$document->storage->bulstat ?? ''}}
{{__('texte.documents_arr.print.bulstat')}} : {{$document->type->documentable_type==1 ? $document->documentable->vat : $document->documentable->contragent->vat}} {{__('texte.documents_arr.print.bulstat')}} : {{$document->storage->vat ?? ''}}
{{$document->type->documentable_type==2 ? __('texte.documents_arr.print.object') : ''}} {{$document->type->documentable_type==2 ? ':' : ''}} {{$document->type->documentable_type==2 ? $document->documentable->user->name : ''}} {{__('texte.documents_arr.print.babh')}} : {{$document->storage->babh ?? ''}}
{{__('texte.documents_arr.print.subregion')}} : {{$document->documentable->subregion->name}}
{{__('texte.documents_arr.print.delivery_address')}} : {{$document->documentable->delivery_address}}
{{__('texte.documents_arr.print.phone')}} : {{!empty($document->documentable->user->mobile) && $document->documentable->user->mobile!='+359' ? $document->documentable->user->mobile.', ' : ''}} {{!empty($document->documentable->user->phone) && $document->documentable->user->phone!='+359' && $document->documentable->user->phone!='+3590' ? $document->documentable->user->phone : ''}}
{{__('texte.documents_arr.print.delivery_date')}} : {{date("d.m.Y",strtotime($document->order->delivery_date))}}
@if($document->print_prices==1) @endif @foreach($document->doc_rows as $index => $doc_row ) @if($document->print_prices==1) @endif @if(empty($document->doc_rows[$index+1]) || $document->doc_rows[$index]->parent_parent_category!=$document->doc_rows[$index+1]->parent_parent_category) @if($document->print_prices==1) @endif @endif @endforeach @foreach($document->intangible_doc_rows as $index => $intangible_doc_row ) @if($document->print_prices==1) @endif @if(empty($document->intangible_doc_rows[$index+1])) @if($document->print_prices==1) @endif @endif @endforeach @if($document->print_prices==1) @endif @if($document->print_prices==1) @if($document->copy!=1) @endif @endif
{{__('texte.documents_arr.print.number')}} {{__('texte.documents_arr.print.batch')}} {{__('texte.documents_arr.print.expiry')}} {{__('texte.documents_arr.print.code')}} {{__('texte.documents_arr.print.product_name')}} {{__('texte.documents_arr.print.measure')}} {{__('texte.documents_arr.print.quantity')}} {{__('texte.documents_arr.print.package')}} {{__('texte.documents_arr.print.counts')}}{{__('texte.documents_arr.print.single_price')}} {{__('texte.documents_arr.print.value')}}
{{$index+1}} {{$doc_row->batch}} {{$doc_row->expiring_date!= null ? date("d.m.Y",strtotime($doc_row->expiring_date)) : ''}} {{$doc_row->product_id}} {{$doc_row->name}} {{$doc_row->measure==1 ? __('texte.documents_arr.print.count') : $doc_row->product->package->name }} {{$doc_row->quantity}} {{$doc_row->package_quantity!=0 && $doc_row->product->is_wrappage==0 ? $doc_row->package_quantity : ''}} {{$doc_row->piece_quantity!=0 ? $doc_row->piece_quantity : ''}}{{number_format(($doc_row->price-$doc_row->discount)*($doc_row->measure==1 ? 1 : $doc_row->product->package_count)*($document->copy==1 ? 1.2 : 1),5,'.','')}} {{number_format($doc_row->value*($document->copy==1 ? 1.2 : 1),2,'.','')}}
{{__('texte.documents_arr.print.total')}}: {{$doc_row->parent_parent_category}} {{$document->doc_rows->where('parent_parent_category',$doc_row->parent_parent_category)->sum('quantity')}} {{$document->doc_rows->where('parent_parent_category',$doc_row->parent_parent_category)->sum('package_quantity')!=0 ? $document->doc_rows->where('parent_parent_category',$doc_row->parent_parent_category)->sum('package_quantity') : ''}} {{$document->doc_rows->where('parent_parent_category',$doc_row->parent_parent_category)->sum('piece_quantity')!=0 ? $document->doc_rows->where('parent_parent_category',$doc_row->parent_parent_category)->sum('piece_quantity') : ''}}{{number_format($document->doc_rows->where('parent_parent_category',$doc_row->parent_parent_category)->sum('value')*($document->copy==1 ? 1.2 : 1),2,'.','')}}
{{$index+1}} {{$intangible_doc_row->batch}} {{$intangible_doc_row->expiring_date!= null ? date("d.m.Y",strtotime($intangible_doc_row->expiring_date)) : ''}} {{$intangible_doc_row->product_id}} {{$intangible_doc_row->name}} {{__('texte.documents_arr.print.count')}} {{$intangible_doc_row->quantity}} {{$intangible_doc_row->quantity}}{{number_format(($intangible_doc_row->price-$intangible_doc_row->discount)*($document->copy==1 ? 1.2 : 1),5,'.','')}} {{number_format($intangible_doc_row->value*($document->copy==1 ? 1.2 : 1),2,'.','')}}
{{__('texte.documents_arr.print.total_intangibles')}} {{$document->intangible_doc_rows->sum('quantity')}} {{$document->intangible_doc_rows->sum('quantity')}}{{number_format($document->intangible_doc_rows->sum('value')*($document->copy==1 ? 1.2 : 1),2,'.','')}}
{{__('texte.documents_arr.print.total_weight')}}: {{number_format($document->total_weight,3,'.','')}} {{$document->doc_rows->sum('quantity')+$document->intangible_doc_rows->sum('quantity')}} {{$document->doc_rows->sum('package_quantity') ? $document->doc_rows->sum('package_quantity') : ''}} {{$document->doc_rows->sum('piece_quantity')+$document->intangible_doc_rows->sum('quantity')!=0 ? $document->doc_rows->sum('piece_quantity')+$document->intangible_doc_rows->sum('quantity') : ''}}{{$document->copy!=1 ? __('texte.documents_arr.print.deal') : __('texte.documents_arr.print.total') }}: {{number_format($document->value*($document->copy==1 ? 1.2 : 1),2,'.','')}}
{{__('texte.documents_arr.print.vat')}} 20%: {{number_format($document->vat,2,'.','')}}
{{__('texte.documents_arr.print.total')}}: {{number_format($document->value-$document->discount+$document->vat,2,'.','')}}
{{__('texte.documents_arr.print.amount_text')}}:/{{$document->total}}/
@if($document->print_prices==1) @endif @foreach($document->doc_rows as $index => $doc_row ) @if($document->print_prices==1) @endif @if(empty($document->doc_rows[$index+1]) || $document->doc_rows[$index]->category!=$document->doc_rows[$index+1]->category) @if($document->print_prices==1) @endif @endif @endforeach @if($document->print_prices==1) @endif @if($document->print_prices==1) @endif
{{__('texte.documents_arr.print.number')}} {{__('texte.documents_arr.print.code')}} {{__('texte.documents_arr.print.product_name')}} {{__('texte.documents_arr.print.measure')}} {{__('texte.documents_arr.print.quantity')}}{{__('texte.documents_arr.print.single_price')}} {{__('texte.documents_arr.print.value')}}
{{$index+1}} {{$doc_row->product_id}} {{$doc_row->name}} {{__('texte.documents_arr.print.count')}} {{$doc_row->quantity}}{{number_format(($doc_row->price-$doc_row->discount)*($doc_row->measure==1 ? 1 : $doc_row->product->package_count),5,'.','')}} {{number_format($doc_row->value,2,'.','')}}
{{__('texte.documents_arr.print.total')}}: {{$doc_row->category==__('texte.documents_arr.print.case') ? __('texte.documents_arr.print.cases') : ($doc_row->category==__('texte.documents_arr.print.bottle') ? __('texte.documents_arr.print.bottles') : ($doc_row->category==__('texte.documents_arr.print.palet') ? __('texte.documents_arr.print.palets') : ($doc_row->category==__('texte.documents_arr.print.keg') ? __('texte.documents_arr.print.kegs') : $doc_row->category==__('texte.documents_arr.print.co2') ? __('texte.documents_arr.print.co2') : '')))}} {{$document->doc_rows->where('category',$doc_row->category)->sum('quantity')}}{{number_format($document->doc_rows->where('category',$doc_row->category)->sum('value'),2,'.','')}}
{{__('texte.documents_arr.print.total_weight')}}: {{number_format($document->total_weight,3,'.','')}} {{__('texte.documents_arr.print.deal')}}: {{number_format($document->doc_rows->sum('value'),2,'.','')}}
{{__('texte.documents_arr.print.amount_text')}}:/{{$document->total}}/
@if($document->payment_type==1) @if($document->storage->bank2!='' && $document->storage->bank2!=null) @endif @endif @if($document->copy==1 && isset($document->object) && $document->type->wrappage_only==0) @endif
{{__('texte.documents_arr.print.payment')}}: {{$document->payment_type==0 ? __('texte.documents_arr.print.cash') : __('texte.documents_arr.print.by_bank')}}
{{__('texte.documents_arr.print.payment_date')}}: {{date("d.m.Y",strtotime($document->payment_date))}}
{{__('texte.documents_arr.print.bank')}}: {{$document->storage->bank}}
{{__('texte.documents_arr.print.account')}}: {{$document->storage->iban}}
{{__('texte.documents_arr.print.bank_code')}}: {{$document->storage->bic}}
{{__('texte.documents_arr.print.bank')}}: {{$document->storage->bank2}}
{{__('texte.documents_arr.print.account')}}: {{$document->storage->iban2}}
{{__('texte.documents_arr.print.bank_code')}}: {{$document->storage->bic2}}
{{__('texte.documents_arr.print.note')}}: {{$document->note}}
{{__('texte.documents_arr.print.source')}}: {{isset($document->order->source) ? __('texte.source_type_arr_text')[$document->order->source] : ''}} {{__('texte.documents_arr.print.picker')}}: {{$document->order->doer->name ?? ''}}
{{__('texte.documents_arr.print.receiver')}}: /................................/ {{__('texte.documents_arr.print.creator')}}: ID {{$document->user_id.' '.$document->user->name}}
{{__('texte.documents_arr.print.old_debt_amount')}} {{__('texte.documents_arr.print.old_debt_wrappage')}} {{__('texte.documents_arr.print.current_amount')}} {{__('texte.documents_arr.print.current_wrappage')}} {{__('texte.documents_arr.print.total_amount')}} {{__('texte.documents_arr.print.paying')}} {{__('texte.documents_arr.print.signature')}}
{{number_format($document->object->debt_money - ($document->doc_rows->sum('value')+$document->intangible_doc_rows->sum('value'))*1.2,2,'.','')}} {{number_format($document->object->debt_packaging - $document->old_wrappage_due,2,'.','')}} {{number_format($document->type->wrappage_only==1 ? $document->doc_rows->sum('value') : ($document->doc_rows->sum('value')+$document->intangible_doc_rows->sum('value'))*1.2,2,'.','')}} {{number_format($document->old_wrappage_due,2,'.','')}} {{number_format($document->object->debt_money + $document->object->debt_packaging,2,'.','')}}

{{__('texte.documents_arr.print.ndk_text')}}

{!! $i
" : "" !!}@endforeach