Round numbers instead of truncating

This commit is contained in:
Edgar P. Burkhart 2023-04-18 14:23:24 +02:00
parent 9a2bbcd5c3
commit fecf8caccf
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -11,7 +11,7 @@ def value(val, pm=False, r=2):
return mark_safe("–") return mark_safe("–")
_prefix = "" _prefix = ""
_suffix = " €" _suffix = " €"
_val = formats.number_format(val, r, use_l10n=True, force_grouping=True) _val = formats.number_format(round(val, r), r, use_l10n=True, force_grouping=True)
if val > 0: if val > 0:
if pm: if pm: