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

{{__('texte.documents_arr.history.show_document_history')}}

@foreach($documentHistory as $history) @if($history->key == 'created_at' && !$history->old_value) @if($history->revisionable_type=='App\Document') @else @endif @elseif($history->key == 'deleted_at' && !$history->old_value) @if($history->revisionable_type=='App\Document') @else @endif @else @endif @endforeach
{{ __('texte.documents_arr.history.document_created')}} {{__('texte.documents_arr.history.by')}} {{$history->userResponsible()->name }} {{__('texte.documents_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.documents_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ $history->userResponsible()->name }} {{ __('texte.documents_arr.history.document_row_created')}}:
{{ __('texte.documents_arr.history.status')}} {{ __('texte.documents_arr.history.parent_id')}} {{ __('texte.documents_arr.history.document_id')}} {{ __('texte.documents_arr.history.product_id')}} {{ __('texte.documents_arr.history.place_id')}} {{ __('texte.documents_arr.history.pallet')}} {{ __('texte.documents_arr.history.old_qty')}} {{ __('texte.documents_arr.history.quantity')}} {{ __('texte.documents_arr.history.measure')}} {{ __('texte.documents_arr.history.batch')}} {{ __('texte.documents_arr.history.expiring_date')}} {{ __('texte.documents_arr.history.price')}} {{ __('texte.documents_arr.history.discount')}} {{ __('texte.documents_arr.history.value')}}
{{$doc_rows_versions[$history->revisionable_id]->status }} {{$doc_rows_versions[$history->revisionable_id]->parent_id }} {{$doc_rows_versions[$history->revisionable_id]->document_id }} {{$doc_rows_versions[$history->revisionable_id]->is_intangible==0 ? $doc_rows_versions[$history->revisionable_id]->product->name : $doc_rows_versions[$history->revisionable_id]->intangible->name}} {{isset($doc_rows_versions[$history->revisionable_id]->place_id) && $doc_rows_versions[$history->revisionable_id]->place_id!=0 ? $doc_rows_versions[$history->revisionable_id]->place->address : ''}} {{$doc_rows_versions[$history->revisionable_id]->pallet }} {{$doc_rows_versions[$history->revisionable_id]->old_qty }} {{$doc_rows_versions[$history->revisionable_id]->quantity }} {{$doc_rows_versions[$history->revisionable_id]->product->is_wrappage>0 ? "брой" : ($doc_rows_versions[$history->revisionable_id]->measure==0 ? __('texte.documents_arr.history.count') : ($doc_rows_versions[$history->revisionable_id]->measure==1 ? $doc_rows_versions[$history->revisionable_id]->product->package->name : __('texte.documents_arr.history.pallet'))) }} {{$doc_rows_versions[$history->revisionable_id]->batch }} {{isset($doc_rows_versions[$history->revisionable_id]->expiring_date) ? date("d.m.Y",strtotime($doc_rows_versions[$history->revisionable_id]->expiring_date)) : '' }} {{$doc_rows_versions[$history->revisionable_id]->price }} {{$doc_rows_versions[$history->revisionable_id]->discount }} {{$doc_rows_versions[$history->revisionable_id]->value }}
{{ __('texte.documents_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.documents_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ __('texte.documents_arr.history.document_deleted')}} {{ __('texte.documents_arr.history.by')}} {{ $history->userResponsible()->name }} {{ __('texte.documents_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.documents_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ $history->userResponsible()->name }} {{ __('texte.documents_arr.history.document_row_deleted')}} :
{{ __('texte.documents_arr.history.status')}} {{ __('texte.documents_arr.history.parent_id')}} {{ __('texte.documents_arr.history.document_id')}} {{ __('texte.documents_arr.history.product_id')}} {{ __('texte.documents_arr.history.place_id')}} {{ __('texte.documents_arr.history.pallet')}} {{ __('texte.documents_arr.history.old_qty')}} {{ __('texte.documents_arr.history.quantity')}} {{ __('texte.documents_arr.history.measure')}} {{ __('texte.documents_arr.history.batch')}} {{ __('texte.documents_arr.history.expiring_date')}} {{ __('texte.documents_arr.history.price')}} {{ __('texte.documents_arr.history.discount')}} {{ __('texte.documents_arr.history.value')}}
{{$doc_rows_versions[$history->revisionable_id]->status }} {{$doc_rows_versions[$history->revisionable_id]->parent_id }} {{$doc_rows_versions[$history->revisionable_id]->document_id }} {{$doc_rows_versions[$history->revisionable_id]->product->name }} {{isset($doc_rows_versions[$history->revisionable_id]->place_id) ? $doc_rows_versions[$history->revisionable_id]->place->address : ''}} {{$doc_rows_versions[$history->revisionable_id]->pallet }} {{$doc_rows_versions[$history->revisionable_id]->old_qty }} {{$doc_rows_versions[$history->revisionable_id]->quantity }} {{$doc_rows_versions[$history->revisionable_id]->product->is_wrappage>0 ? __('texte.documents_arr.history.count') : ($doc_rows_versions[$history->revisionable_id]->measure==0 ? __('texte.documents_arr.history.count') : ($doc_rows_versions[$history->revisionable_id]->measure==1 ? $doc_rows_versions[$history->revisionable_id]->product->package->name : __('texte.documents_arr.history.pallet'))) }} {{$doc_rows_versions[$history->revisionable_id]->batch }} {{isset($doc_rows_versions[$history->revisionable_id]->expiring_date) ? date("d.m.Y",strtotime($doc_rows_versions[$history->revisionable_id]->expiring_date)) : '' }} {{$doc_rows_versions[$history->revisionable_id]->price }} {{$doc_rows_versions[$history->revisionable_id]->discount }} {{$doc_rows_versions[$history->revisionable_id]->value }}
{{__('texte.documents_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.documents_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ $history->userResponsible()->name }} {{__('texte.documents_arr.history.changed_field')}} @switch($history->fieldName()) @case('have_vat') {{__('texte.documents_arr.history.have_vat')}} {{__('texte.documents_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.documents_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @case('date') {{__('texte.documents_arr.history.date')}} {{__('texte.documents_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : date("d.m.Y",strtotime($history->oldValue()))}} {{__('texte.documents_arr.history.to')}} {{ date("d.m.Y",strtotime($history->newValue())) }} @break @case('payment_date') {{__('texte.documents_arr.history.payment_date')}} {{__('texte.documents_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : date("d.m.Y",strtotime($history->oldValue()))}} {{__('texte.documents_arr.history.to')}} {{ date("d.m.Y",strtotime($history->newValue())) }} @break @default {{__('texte.documents_arr.history.'.$history->fieldName())}} {{__('texte.documents_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.documents_arr.history.to')}} {{ $history->newValue() }} @break @endswitch {{__('texte.documents_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.documents_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
@endsection