Update dollars filter and formatDollars() to display cent values

This commit is contained in:
leigh-mil
2019-01-31 11:29:52 -05:00
parent 6d61839c65
commit 0382966929
3 changed files with 9 additions and 17 deletions

View File

@@ -12,14 +12,6 @@ def iconSvg(name):
def dollars(value):
try:
numberValue = float(value)
except ValueError:
numberValue = 0
return "${:,.0f}".format(numberValue)
def dollarsWithCents(value):
try:
numberValue = float(value)
except ValueError:
@@ -107,7 +99,6 @@ def normalizeOrder(title):
def register_filters(app):
app.jinja_env.filters["iconSvg"] = iconSvg
app.jinja_env.filters["dollars"] = dollars
app.jinja_env.filters["dollarsWithCents"] = dollarsWithCents
app.jinja_env.filters["usPhone"] = usPhone
app.jinja_env.filters["readableInteger"] = readableInteger
app.jinja_env.filters["getOptionLabel"] = getOptionLabel