From: Sven Schöling Date: Thu, 27 Jul 2017 13:46:00 +0000 (+0200) Subject: ShippedQty: Auch bei short circuit chainen X-Git-Tag: release-3.5.4~935 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=66ac2e99e04696a3088ed14c353041e3f1da6d75;p=kivitendo-erp.git ShippedQty: Auch bei short circuit chainen --- diff --git a/SL/Helper/ShippedQty.pm b/SL/Helper/ShippedQty.pm index e9c8e4e8b..9775570b4 100644 --- a/SL/Helper/ShippedQty.pm +++ b/SL/Helper/ShippedQty.pm @@ -104,11 +104,11 @@ sub calculate { die 'Need exactly one argument, either id, object or arrayref of ids or objects.' unless 2 == @_; - return if !$data || ('ARRAY' eq ref $data && !@$data); + return $self if !$data || ('ARRAY' eq ref $data && !@$data); $self->normalize_input($data); - return unless @{ $self->oe_ids }; + return $self unless @{ $self->oe_ids }; $self->calculate_item_links; $self->calculate_fill_up if $self->fill_up;