Fix floating-point issue on bills (Fix #31)

This commit is contained in:
fnux 2020-05-08 11:13:11 +02:00
commit 74e2168529
2 changed files with 8 additions and 1 deletions

View file

@ -1,9 +1,12 @@
from django.utils.translation import gettext_lazy as _
import decimal
# Define DecimalField properties, used to represent amounts of money.
AMOUNT_MAX_DIGITS=10
AMOUNT_DECIMALS=2
decimal.getcontext().prec = AMOUNT_DECIMALS
# http://xml.coverpages.org/country3166.html
COUNTRIES = (
('AD', _('Andorra')),