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

{{__('texte.cash_transfers_arr.history.show_cash_transfer_history')}}

@foreach($cashTransferHistory as $history) @if($history->key == 'created_at' && !$history->old_value) @elseif($history->key == 'deleted_at' && !$history->old_value) @else @endif @endforeach
{{ __('texte.cash_transfers_arr.history.cash_transfer_created')}} {{__('texte.cash_transfers_arr.history.by')}} {{$history->userResponsible()->name }} {{__('texte.cash_transfers_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.cash_transfers_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ __('texte.cash_transfers_arr.history.cash_transfer_deleted')}} {{ __('texte.cash_transfers_arr.history.by')}} {{ $history->userResponsible()->name }} {{ __('texte.cash_transfers_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.cash_transfers_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
{{ $history->userResponsible()->name }} {{__('texte.cash_transfers_arr.history.changed_field')}} @switch($history->fieldName()) @case('date') {{__('texte.cash_transfers_arr.history.date')}} {{__('texte.cash_transfers_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : date('d.m.Y',strtotime($history->oldValue()))}} {{__('texte.cash_transfers_arr.history.to')}} {{ date('d.m.Y',strtotime($history->newValue())) }} @break @case('unit') {{__('texte.cash_transfers_arr.history.unit')}} {{__('texte.cash_transfers_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()==0 ? __('texte.cash_transfers_arr.history.liter') : __('texte.cash_transfers_arr.history.kg') }} {{__('texte.cash_transfers_arr.history.to')}} {{ $history->newValue()==0 ? __('texte.cash_transfers_arr.history.liter') : __('texte.cash_transfers_arr.history.kg') }} @break @case('active') {{__('texte.cash_transfers_arr.history.active')}} {{__('texte.cash_transfers_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}} {{__('texte.cash_transfers_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }} @break @default {{__('texte.cash_transfers_arr.history.'.$history->fieldName())}} {{__('texte.cash_transfers_arr.history.from')}} {{ $history->oldValue()==null ? '" "' : $history->oldValue()}} {{__('texte.cash_transfers_arr.history.to')}} {{ $history->newValue() }} @break @endswitch {{__('texte.cash_transfers_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.cash_transfers_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
@endsection