From 8d6e65bb997ce3c55fc68842378140384bd97f51 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Thu, 8 Apr 2021 08:25:00 +0000 Subject: [PATCH] Neuerfassen von Artikeln, darf keinen Division by Zero Fehler werfen --- templates/webpages/part/_assembly.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 %] + -- 2.20.1