@extends('layouts.app') @section('link') @endsection @section('style') @endsection @section('content')
@include('shared.messages')

{{__('texte.documents_arr.show.show_document')}}
@permission('document-route-edit') @if(auth()->user()->id==1) @if($document->type->payment_type==3) @endif @endif @if(in_array($document->doc_type,array(17,38,39,40))) @endif @endpermission @if(($document->doc_type==1 || $document->doc_type==9) && $document->status!=0 && $document->rows->max('old_qty')==0) @endif @if(($document->doc_type==1 || $document->doc_type==9) && $document->union_id!=0 && $document->union->rows->max('old_qty')==0) Премахни от обединение @endif @if($document->json!=null) @endif @if($document->type->id==21) {{__('texte.documents_arr.show.recalculate')}} @endif @if($document->type->route_type==4) @endif @if($document->doc_type==20 && $document->occupied==1) @permission('document-route-edit') @endpermission @endif @if($document->doc_type==49) id)}}' target='_blank'>{{__('texte.documents_arr.show.print')}} @endif @if($document->type->can_be_parent==1) @endif {{__('texte.documents_arr.show.exit')}}

{{__('texte.documents_arr.show.created_by')}}: {{ $document->user->name }}
@if ($document->documentable instanceof \App\Contragent) {{__('texte.documents_arr.show.supplier')}}: {{ $document->documentable->company_name ?? $document->documentable->user->name }} @elseif ($document->documentable instanceof \App\Obect) {{__('texte.documents_arr.show.contragent')}}: {{ $document->documentable->contragent->company_name ?? $document->documentable->contragent->user->name }}

{{__('texte.documents_arr.show.object')}}: {{ $document->documentable->user->name }} @else {{__('texte.documents_arr.show.user')}}: {{ $document->documentable->name }} @endif
{{__('texte.documents_arr.show.type')}}:
@if($document->account_id==0)
{{__('texte.documents_arr.show.reporting')}}: {{__('texte.documents_arr.show.no_case')}}
@endif @if($document->vehicle_id!=0)
{{__('texte.documents_arr.show.vehicle')}}: {{ $document->vehicle->reg_number }}
@endif
{{__('texte.documents_arr.show.number')}}: {{ $document->number }}
@if($document->course_id!=0)
Курс: {{ $document->course_id }}
@endif @if($document->account_id==-2)
{{__('texte.documents_arr.show.initial_balance')}}
@endif
{{__('texte.documents_arr.show.storage')}}: {{ $document->storage_id!=0 ? $document->storage->name : ''}}
{{__('texte.documents_arr.show.date')}}: {{ (new DateTime($document->date))->format('d.m.Y') }}
@if($document->payment_date)
{{__('texte.documents_arr.show.due_date')}}: {{ $document->payment_date ? (new DateTime($document->payment_date))->format('d.m.Y') : '' }}
{{__('texte.documents_arr.show.payment')}}: {{ mb_ucfirst(App\Document::PAYMENT[$document->payment_type]) }}
@endif
{{__('texte.documents_arr.show.status')}}: {{ mb_ucfirst(App\Document::STATUS[$document->status] ?? App\Document::STATUS[2]) }}
{{__('texte.documents_arr.show.creation')}}: {{ mb_ucfirst(App\Document::CREATIONS[$document->creation-1]['title']) }}
@if($document->note)
{{__('texte.documents_arr.show.note')}}: {{ $document->note }}
@endif @if($document->value!='0.00000')
{{__('texte.documents_arr.show.value')}}: {{ number_format($document->value,2,'.','') }}
@if($document->vat_rate_id!=0)
{{__('texte.documents_arr.show.vat')}}: {{ number_format($document->vat,2,'.','') }}
@elseif($document->vat_rate_id==0 && $document->type->route_type!=0 && $document->type->route_type!=1 && $document->type->wrappage_only!=1)
{{__('texte.documents_arr.show.vat_exception')}}: {{ $document->grounds }}
@endif
{{__('texte.documents_arr.show.total')}}: {{ number_format($document->total,2,'.','') }}
{{__('texte.documents_arr.show.paid')}}: {{ number_format($document->paid,2,'.','') }}
@if($document->account_id>0)
{{__('texte.documents_arr.show.bank')}}: {{ $document->account->bank->name }}
{{__('texte.documents_arr.show.account')}}: {{ $document->account->number }}
{{__('texte.documents_arr.show.currency')}}: {{__('texte.currencies_arr')[$document->account->currency]}}
@endif @endif
@endsection