From: Moritz Bunkus Date: Mon, 23 Feb 2015 09:08:31 +0000 (+0100) Subject: PriceTaxCalculator: Belege ohne Positionen richtig verarbeiten können X-Git-Tag: release-3.2.0~15 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f34953cad258ff91e1ce024309478c8c50882a87;p=kivitendo-erp.git PriceTaxCalculator: Belege ohne Positionen richtig verarbeiten können --- 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 };