X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/1e7d8e31721d592284644da88b3f03ccce98d10c..12e513005cda066d28dd1ed69439e916906cfbd3:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index 590923361..d1358dec5 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};