From: G. Richardson Date: Tue, 31 Jan 2017 15:39:28 +0000 (+0100) Subject: Bestehende Erzeugnisse korrekt speichern X-Git-Tag: release-3.5.4~1601 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d3b2be265715bdde58118795f2fb870bafa7edd9;p=kivitendo-erp.git Bestehende Erzeugnisse korrekt speichern siehe Ticket #227 --- 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')