From f34953cad258ff91e1ce024309478c8c50882a87 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 23 Feb 2015 10:08:31 +0100 Subject: [PATCH] =?utf8?q?PriceTaxCalculator:=20Belege=20ohne=20Positionen?= =?utf8?q?=20richtig=20verarbeiten=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/PriceTaxCalculator.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/DB/Helper/PriceTaxCalculator.pm b/SL/DB/Helper/PriceTaxCalculator.pm index fca37f59b..44c651196 100644 --- a/SL/DB/Helper/PriceTaxCalculator.pm +++ b/SL/DB/Helper/PriceTaxCalculator.pm @@ -19,7 +19,7 @@ sub calculate_prices_and_taxes { require SL::DB::PriceFactor; require SL::DB::Unit; - SL::DB::Part->load_cached(map { $_->parts_id } @{ $self->items }) if @{ $self->items }; + SL::DB::Part->load_cached(map { $_->parts_id } @{ $self->items }) if @{ $self->items || [] }; my %units_by_name = map { ( $_->name => $_ ) } @{ SL::DB::Manager::Unit->get_all }; my %price_factors_by_id = map { ( $_->id => $_ ) } @{ SL::DB::Manager::PriceFactor->get_all }; -- 2.20.1