From: Jan Büren Date: Thu, 8 Apr 2021 08:25:00 +0000 (+0000) Subject: Neuerfassen von Artikeln, darf keinen Division by Zero Fehler werfen X-Git-Tag: kivitendo-mebil_0.1-0~9^2~369 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8d6e65bb997ce3c55fc68842378140384bd97f51;p=kivitendo-erp.git Neuerfassen von Artikeln, darf keinen Division by Zero Fehler werfen --- diff --git a/templates/webpages/part/_assembly.html b/templates/webpages/part/_assembly.html index d3eaded6a..bc32cf899 100644 --- a/templates/webpages/part/_assembly.html +++ b/templates/webpages/part/_assembly.html @@ -71,7 +71,11 @@ [% 'Margepercent' | $T8 %]: - [%- LxERP.format_amount(100 - (items_lastcost_sum / items_sellprice_sum * 100), 2, 0) %]% + + [% IF items_sellprice_sum > 0 %] + [%- LxERP.format_amount(100 - (items_lastcost_sum / items_sellprice_sum * 100), 2, 0) %] + [% END %] +