Update dollars filter and formatDollars() to display cent values
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user