From: Bernd Bleßmann Date: Tue, 12 Apr 2022 07:36:17 +0000 (+0200) Subject: Angebot/Auftrag: "Als neu speichern": Warnung bei ungültigen Artikeln X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~53 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=40f3befb965dd6125c0da70ad292f41a5d168d1c;p=kivitendo-erp.git Angebot/Auftrag: "Als neu speichern": Warnung bei ungültigen Artikeln Als Flash-Meldung im neuen Beleg. --- diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 025078111..0dd06ebd4 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -259,6 +259,10 @@ sub action_save_as_new { # Update employee $new_attrs{employee} = SL::DB::Manager::Employee->current; + # Warn on obsolete items + my @obsolete_positions = map { $_->position } grep { $_->part->obsolete } @{ $order->items_sorted }; + flash_later('warning', t8('This record containts obsolete items at position #1', join ', ', @obsolete_positions)) if @obsolete_positions; + # Create new record from current one $self->order(SL::DB::Order->new_from($order, destination_type => $order->type, attributes => \%new_attrs)); diff --git a/locale/de/all b/locale/de/all index b4c12b76a..791e6e5f5 100755 --- a/locale/de/all +++ b/locale/de/all @@ -3915,6 +3915,7 @@ $self->{texts} = { 'This part was already counted for this bin:' => 'Dieser Artikel wurde für diesen Lagerplatz bereits erfasst:', 'This price has since gone down' => 'Dieser Preis ist mittlerweile niedriger', 'This price has since gone up' => 'Dieser Preis ist mittlerweile höher', + 'This record containts obsolete items at position #1' => 'Dieser Beleg enthält ungültige Artikel an Position #1', 'This record has already been closed.' => 'Dieser Beleg wurde bereits geschlossen.', 'This record has already been delivered.' => 'Dieser Beleg wurde bereits geliefert.', 'This record has not been saved yet.' => 'Der Beleg wurde noch nicht gespeichert.', diff --git a/locale/en/all b/locale/en/all index 0c0c44f41..f08787047 100644 --- a/locale/en/all +++ b/locale/en/all @@ -3914,6 +3914,7 @@ $self->{texts} = { 'This part was already counted for this bin:' => '', 'This price has since gone down' => '', 'This price has since gone up' => '', + 'This record containts obsolete items at position #1' => '', 'This record has already been closed.' => '', 'This record has already been delivered.' => '', 'This record has not been saved yet.' => '',