From: Sven Schöling Date: Fri, 17 Dec 2021 18:26:04 +0000 (+0100) Subject: DeliveryOrder: nur umlagern erlauben wenn bereits gespeichert wurde X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~216^2~18 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d0aa6c16de242c936d6a530316d1052259108a32;p=kivitendo-erp.git DeliveryOrder: nur umlagern erlauben wenn bereits gespeichert wurde Da das Umlagern kein redirect macht ist danach sonst die URL falsch. --- 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?'), ],