From: Moritz Bunkus Date: Fri, 4 Jul 2014 08:40:23 +0000 (+0200) Subject: PreisTaxCalculator: Caching-Abfrage für »keine Positionen« gefixt X-Git-Tag: release-3.2.0beta~398 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=89e9e5dbb9cebcfefa9b3cd7210b9475cf9134b4;p=kivitendo-erp.git PreisTaxCalculator: Caching-Abfrage für »keine Positionen« gefixt --- diff --git a/SL/DB/Helper/PriceTaxCalculator.pm b/SL/DB/Helper/PriceTaxCalculator.pm index ed485c190..a067bd4f5 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 }); + 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 };