From d3b2be265715bdde58118795f2fb870bafa7edd9 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Tue, 31 Jan 2017 16:39:28 +0100 Subject: [PATCH] Bestehende Erzeugnisse korrekt speichern siehe Ticket #227 --- SL/Controller/Part.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index 5dc37b45a..eb1d52b64 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -964,7 +964,7 @@ sub form_check_assortment_items_exist { my ($self) = @_; return 1 unless $::form->{part}{part_type} eq 'assortment'; - # skip check for existing parts that have been used + # skip item check for existing assortments that have been used return 1 if ($self->part->id and !$self->part->orphaned); # new or orphaned parts must have items in $::form->{assortment_items} @@ -1001,6 +1001,9 @@ sub form_check_assembly_items_exist { return 1 unless $::form->{part}->{part_type} eq 'assembly'; + # skip item check for existing assembly that have been used + return 1 if ($self->part->id and !$self->part->orphaned); + unless ( $::form->{assembly_items} and scalar @{$::form->{assembly_items}} ) { $self->js->run('kivi.Part.set_tab_active_by_name', 'assembly_tab') ->focus('#add_assembly_item_name') -- 2.20.1