@foreach($orderHistory as $history)
@if($history->key == 'created_at' && !$history->old_value)
@if($history->revisionable_type=='App\Order')
{{ __('texte.orders_arr.history.order_created')}} {{__('texte.orders_arr.history.by')}} {{$history->userResponsible()->name }} | {{__('texte.orders_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.orders_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
|
@else
{{ $history->userResponsible()->name }} {{ __('texte.orders_arr.history.created_row_order')}}:
|
{{ __('texte.orders_arr.history.product')}} |
{{ __('texte.orders_arr.history.gift')}} |
{{ __('texte.orders_arr.history.quantity')}} |
{{ __('texte.orders_arr.history.package')}} |
{{ __('texte.orders_arr.history.price_type')}} |
{{ __('texte.orders_arr.history.price')}} |
{{ __('texte.orders_arr.history.discount')}} |
{{$order_products_versions[$history->revisionable_id]->produkt->name }} |
{{$order_products_versions[$history->revisionable_id]->gift==1 ? __('texte.orders_arr.history.yes') : __('texte.orders_arr.history.no')}} |
{{$order_products_versions[$history->revisionable_id]->quantity_ordered}} |
{{$order_products_versions[$history->revisionable_id]->package==1 ? __('texte.orders_arr.history.piece') : $order_products_versions[$history->revisionable_id]->produkt->package->name }} |
{{__('texte.full_price_arr')[$order_products_versions[$history->revisionable_id]->price] }} |
{{$order_products_versions[$history->revisionable_id]->single_price }} |
{{$order_products_versions[$history->revisionable_id]->discount }} |
|
{{ __('texte.orders_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.orders_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }}
|
@endif
@elseif($history->key == 'deleted_at' && !$history->old_value)
@if($history->revisionable_type=='App\Order')
{{ __('texte.orders_arr.history.order_deleted')}} {{ __('texte.orders_arr.history.by')}} {{ $history->userResponsible()->name }} | {{ __('texte.orders_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{ __('texte.orders_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }} |
@else
{{ $history->userResponsible()->name }} {{ __('texte.orders_arr.history.deleted_row_order')}} : |
{{ __('texte.orders_arr.history.product')}} |
{{ __('texte.orders_arr.history.gift')}} |
{{ __('texte.orders_arr.history.quantity')}} |
{{ __('texte.orders_arr.history.package')}} |
{{ __('texte.orders_arr.history.price_type')}} |
{{ __('texte.orders_arr.history.price')}} |
{{ __('texte.orders_arr.history.discount')}} |
{{$order_products_versions[$history->revisionable_id]->produkt->name }} |
{{$order_products_versions[$history->revisionable_id]->gift==1 ? __('texte.orders_arr.history.yes') : __('texte.orders_arr.history.no')}} |
{{$order_products_versions[$history->revisionable_id]->quantity_ordered}} |
{{$order_products_versions[$history->revisionable_id]->package==1 ? __('texte.orders_arr.history.piece') : $order_products_versions[$history->revisionable_id]->produkt->package->name }} |
{{__('texte.full_price_arr')[$order_products_versions[$history->revisionable_id]->price] }} |
{{$order_products_versions[$history->revisionable_id]->single_price }} |
{{$order_products_versions[$history->revisionable_id]->discount }} |
|
{{__('texte.orders_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.orders_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }} |
@endif
@else
{{ $history->userResponsible()->name ?? '' }} {{__('texte.orders_arr.history.changed_field')}}
@switch($history->fieldName())
@case('parent_id')
{{__('texte.orders_arr.history.parent_id')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : $history->oldValue()}}
{{__('texte.orders_arr.history.to')}} {{ $history->newValue() }}
@break
@case('payment_type')
{{__('texte.orders_arr.history.payment_type')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : __('texte.payment_types_arr')[$history->oldValue()]}}
{{__('texte.orders_arr.history.to')}} {{ __('texte.payment_types_arr')[$history->newValue()] }}
@break
@case('delivery_date')
{{__('texte.orders_arr.history.delivery_date')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : date("d.m.Y",strtotime($history->oldValue()))}}
{{__('texte.orders_arr.history.to')}} {{ date("d.m.Y",strtotime($history->newValue())) }}
@break
@case('payment_date')
{{__('texte.orders_arr.history.payment_date')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : date("d.m.Y",strtotime($history->oldValue()))}}
{{__('texte.orders_arr.history.to')}} {{ date("d.m.Y",strtotime($history->newValue())) }}
@break
@case('type')
{{__('texte.orders_arr.history.order_type')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : __('texte.order_type_arr')[$history->oldValue()]}}
{{__('texte.orders_arr.history.to')}} {{ __('texte.order_type_arr')[$history->newValue()] }}
@break
@case('urgent')
{{__('texte.orders_arr.history.urgent')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}}
{{__('texte.orders_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }}
@break
@case('note')
{{__('texte.orders_arr.history.note')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : $history->oldValue()}}
{{__('texte.orders_arr.history.to')}} {{ $history->newValue() }}
@break
@case('status')
{{__('texte.orders_arr.history.status')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : __('texte.status_type_arr')[$history->oldValue()]}}
{{__('texte.orders_arr.history.to')}} {{ __('texte.status_type_arr')[$history->newValue()] }}
@break
@case('picker_id')
{{__('texte.orders_arr.history.picker_id')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : $history->oldValue()}}
{{__('texte.orders_arr.history.to')}} {{ $history->newValue() }}
@break
@case('unlock_sent')
{{__('texte.orders_arr.history.unlock_sent')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : __('texte.replies_arr')[$history->oldValue()]}}
{{__('texte.orders_arr.history.to')}} {{ __('texte.replies_arr')[$history->newValue()] }}
@break
@case('applied_promotions')
{{__('texte.orders_arr.history.applied_promotions')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : $history->oldValue()}}
{{__('texte.orders_arr.history.to')}} {{ $history->newValue() }}
@break
@case('total_amount')
{{__('texte.orders_arr.history.total_amount')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : $history->oldValue()}}
{{__('texte.orders_arr.history.to')}} {{ $history->newValue() }}
@break
@case('total_discounts')
{{__('texte.orders_arr.history.total_discounts')}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : $history->oldValue()}}
{{__('texte.orders_arr.history.to')}} {{ $history->newValue() }}
@break
@default
{{$history->fieldName()}}
{{__('texte.orders_arr.history.from')}}
{{ $history->oldValue()==null ? '" "' : $history->oldValue()}}
{{__('texte.orders_arr.history.to')}} {{ $history->newValue() }}
@break
@endswitch
|
{{__('texte.orders_arr.history.on')}} {{ date("d.m.Y",strtotime($history->created_at)) }} {{__('texte.orders_arr.history.at')}} {{ date("H:i",strtotime($history->created_at)) }} |
@endif
@endforeach