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

{{__('texte.documents_arr.show.show_document')}}

{{__('texte.documents_arr.show.created_by')}}: {{ $document->user->name }}
@if ($document->documentable instanceof \App\Models\Supplier) {{__('texte.documents_arr.show.supplier')}}: {{$document->documentable->name}} @elseif ($document->documentable instanceof \App\Models\Obect) {{__('texte.documents_arr.show.client')}}: {{ $document->documentable->client->name }}

{{__('texte.documents_arr.show.object')}}: {{ $document->documentable->name }} @endif
{{__('texte.documents_arr.show.type')}}:
{{__('texte.documents_arr.show.number')}}: {{ $document->number }}
@if($document->storage_id!=0)
{{__('texte.documents_arr.show.storage')}}: {{ $document->storage_id!=0 ? $document->storage->name : ''}}
@endif
{{__('texte.documents_arr.show.date')}}: {{ (new DateTime($document->date))->format('d.m.Y') }}
@if($document->payment_date)
{{__('texte.documents_arr.show.payment_date')}}: {{ $document->payment_date ? (new DateTime($document->payment_date))->format('d.m.Y') : '' }}
{{__('texte.documents_arr.show.payment_type')}}: {{ $document->payment_type==1 ? __('texte.documents_arr.show.cash') : __('texte.documents_arr.show.bank') }}
@endif
{{__('texte.documents_arr.show.status')}}: {{ __('texte.document_statuses_arr')[$document->status]}}
{{__('texte.documents_arr.show.creation_type')}}: {{ $document->creation_type==1 ? __('texte.documents_arr.show.internal') : __('texte.documents_arr.show.external') }}
@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->doc_type->route_type!=0 && $document->doc_type->route_type!=1 && $document->doc_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,'.','') }}
@endif
@endsection