From: Jan Büren Date: Sun, 28 Oct 2018 11:28:51 +0000 (+0100) Subject: Fehlermeldung bei 'als neu Speichern' bei Erzeugnissen ohne Erzeungisbestandteile... X-Git-Tag: release-3.5.4~210 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=846482823a97eb26eb164cff77fce3d6ea0deedc;p=kivitendo-erp.git Fehlermeldung bei 'als neu Speichern' bei Erzeugnissen ohne Erzeungisbestandteile werfen --- diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index 357a3dd07..31c670abb 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -646,6 +646,8 @@ sub prepare_assortment_render_vars { sub prepare_assembly_render_vars { my ($self) = @_; + croak("Need assembly item(s) to create a 'save as new' assembly.") unless $self->part->items; + my %vars = ( items_sellprice_sum => $self->part->items_sellprice_sum, items_lastcost_sum => $self->part->items_lastcost_sum, assembly_html => $self->render_assembly_items_to_html( \@{ $self->part->items } ),