genere devis en pdf
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user