diff --git a/InvenTree/report/templatetags/report.py b/InvenTree/report/templatetags/report.py index 6917271a40..aea2105abb 100644 --- a/InvenTree/report/templatetags/report.py +++ b/InvenTree/report/templatetags/report.py @@ -410,7 +410,10 @@ def format_number(number, **kwargs): except ValueError: pass - value = str(number) + # Re-encode, and normalize again + value = Decimal(number).normalize() + value = format(value, 'f') + value = str(value) leading = kwargs.get('leading', None) diff --git a/docs/docs/report/report.md b/docs/docs/report/report.md index e82ac5ead6..1bd05c3c6d 100644 --- a/docs/docs/report/report.md +++ b/docs/docs/report/report.md @@ -117,6 +117,7 @@ So, if you are writing a template which has custom formatting, (or any other sec ```html {% raw %} +{% load l10n %}