From d0aa6c16de242c936d6a530316d1052259108a32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 17 Dec 2021 19:26:04 +0100 Subject: [PATCH] DeliveryOrder: nur umlagern erlauben wenn bereits gespeichert wurde Da das Umlagern kein redirect macht ist danach sonst die URL falsch. --- SL/Controller/DeliveryOrder.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/Controller/DeliveryOrder.pm b/SL/Controller/DeliveryOrder.pm index 80a0d2eb8..7997d3e6d 100644 --- a/SL/Controller/DeliveryOrder.pm +++ b/SL/Controller/DeliveryOrder.pm @@ -1887,7 +1887,8 @@ sub setup_edit_action_bar { t8('Transfer out'), id => 'transfer_out_action', call => [ 'kivi.DeliveryOrder.save', 'transfer_stock' ], - disabled => $self->order->delivered ? t8('The parts for this order have already been transferred') : undef, + disabled => !$self->order->id ? t8('This object has not been saved yet.') : + $self->order->delivered ? t8('The parts for this order have already been transferred') : undef, only_if => $self->type_data->properties('transfer') eq 'out', confirm => t8('Do you really want to transfer the stock and set this order to delivered?'), ], @@ -1895,7 +1896,8 @@ sub setup_edit_action_bar { t8('Transfer in'), id => 'transfer_in_action', call => [ 'kivi.DeliveryOrder.save', 'transfer_stock' ], - disabled => $self->order->delivered ? t8('The parts for this order have already been transferred') : undef, + disabled => !$self->order->id ? t8('This object has not been saved yet.') : + $self->order->delivered ? t8('The parts for this order have already been transferred') : undef, only_if => $self->type_data->properties('transfer') eq 'in', confirm => t8('Do you really want to transfer the stock and set this order to delivered?'), ], -- 2.20.1