Use split to get dollars and cents
This commit is contained in:
parent
ba75466556
commit
cf13ff9104
@ -21,12 +21,12 @@ def dollars(value):
|
||||
|
||||
def justDollars(value):
|
||||
raw = dollars(value)
|
||||
return raw[:-3]
|
||||
return raw.split(".")[0]
|
||||
|
||||
|
||||
def justCents(value):
|
||||
raw = dollars(value)
|
||||
return raw[-3:]
|
||||
return raw.split(".")[1]
|
||||
|
||||
|
||||
def usPhone(number):
|
||||
|
@ -26,7 +26,7 @@
|
||||
{{ portfolio.task_orders | selectattr('is_active') | sum(attribute='budget') | justDollars }}
|
||||
</span>
|
||||
<span class='cents'>
|
||||
{{ portfolio.task_orders | selectattr('is_active') | sum(attribute='budget') | justCents }}
|
||||
.{{ portfolio.task_orders | selectattr('is_active') | sum(attribute='budget') | justCents }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user