From: G. Richardson Date: Tue, 21 Dec 2010 12:07:59 +0000 (+0100) Subject: Bug 1520: Division by zero Fehler X-Git-Tag: release-2.6.2beta1~68 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=284b226e18d898ecbeceef0f8bb215c3c1ad8aa7;p=kivitendo-erp.git Bug 1520: Division by zero Fehler verhindern, daß Preisfaktor 0 ist --- diff --git a/SL/IS.pm b/SL/IS.pm index 590923361..f9f8046f7 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1277,7 +1277,7 @@ sub cogs { # total expenses and inventory # sellprice is the cost of the item - my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ($ref->{price_factor} * ( $basefactor || 1 )), 2); + my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ( ($ref->{price_factor} Ì£|| 1) * ( $basefactor || 1 )), 2); if (!$main::eur) { $ref->{expense_accno} = ($form->{"expense_accno_$row"}) ? $form->{"expense_accno_$row"} : $ref->{expense_accno};