genere devis en pdf

This commit is contained in:
2020-11-11 15:05:59 +01:00
parent 6bc9d34fde
commit dab24387a2
10 changed files with 173 additions and 130 deletions

View File

@@ -37,14 +37,14 @@ def to_decimal(x):
return decimal.Decimal(str(x))
def to_euro(x):
"""Takes a float and returns a string"""
"""Takes a float and returns 12 345,67 €"""
locale.setlocale(locale.LC_ALL,'')
return locale.currency(x, True, True)
def to_euroz(x):
"""Takes a float and returns a string"""
"""Takes a float and returns 12 345,67 € if not zero"""
if x == 0:
return ""
return ''
else:
return to_euro(x)