DeliveryOrder: delete deaktivieren, wenn schon ausgelagert
authorSven Schöling <s.schoeling@googlemail.com>
Mon, 31 Jan 2022 07:40:21 +0000 (08:40 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 14 Feb 2022 14:04:13 +0000 (15:04 +0100)
SL/Controller/DeliveryOrder.pm

index 79931fd..8f3d838 100644 (file)
@@ -1878,7 +1878,8 @@ sub setup_edit_action_bar {
         t8('Delete'),
         call     => [ 'kivi.DeliveryOrder.delete_order' ],
         confirm  => $::locale->text('Do you really want to delete this object?'),
-        disabled => !$self->order->id ? t8('This object has not been saved yet.') : 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->show_menu("delete"),
       ],