diff --git a/pytrustnfe/nfe/danfe.py b/pytrustnfe/nfe/danfe.py index 62b47b92..3d5d251b 100644 --- a/pytrustnfe/nfe/danfe.py +++ b/pytrustnfe/nfe/danfe.py @@ -7,6 +7,7 @@ from io import BytesIO from textwrap import wrap import math +from decimal import Decimal from reportlab.lib import utils from reportlab.pdfgen import canvas @@ -84,7 +85,8 @@ def getdateByTimezone(cDateUTC, timezone=None): def format_number(cNumber): if cNumber: - return cNumber.replace(",", "X").replace("X", ".").replace(".", ",") + cNumber = "{0:,}".format(Decimal(cNumber)) + return cNumber.replace(",", "X").replace(".", ",").replace("X", ".") return "" diff --git a/setup.py b/setup.py index a6308521..911c7281 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages -VERSION = "2.0.0" +VERSION = "2.0.1" setup(