From: Sven Schöling Date: Thu, 11 Sep 2014 15:05:50 +0000 (+0200) Subject: PriceRule: Fehler vermeiden wenn noch keine Preisregeln angelegt sind. X-Git-Tag: release-3.2.0beta~148 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8fce025436cffd1f28b710e258069135a59fd4fc;p=kivitendo-erp.git PriceRule: Fehler vermeiden wenn noch keine Preisregeln angelegt sind. --- diff --git a/SL/DB/Manager/PriceRule.pm b/SL/DB/Manager/PriceRule.pm index 09e588b88..a3eeaff99 100644 --- a/SL/DB/Manager/PriceRule.pm +++ b/SL/DB/Manager/PriceRule.pm @@ -50,6 +50,8 @@ sub get_all_matching { my ($query, @values) = $self->get_matching_filter(%params); my @ids = selectall_ids($::form, $::form->get_standard_dbh, $query, 0, @values); + return [] unless @ids; + $self->get_all(query => [ id => \@ids ]); }