From 846482823a97eb26eb164cff77fce3d6ea0deedc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sun, 28 Oct 2018 12:28:51 +0100 Subject: [PATCH] Fehlermeldung bei 'als neu Speichern' bei Erzeugnissen ohne Erzeungisbestandteile werfen --- SL/Controller/Part.pm | 2 ++ 1 file changed, 2 insertions(+) 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 } ), -- 2.20.1