Support deposits getting the total.
Budgets don't support deposits, so this is dead code (for now).
This commit is contained in:
parent
ed8413eaae
commit
1dc3829242
|
@ -66,8 +66,8 @@ def _get_current_spent_amount(budget_id):
|
||||||
for detail in transaction.get('attributes').get('transactions'):
|
for detail in transaction.get('attributes').get('transactions'):
|
||||||
if detail.get('type') == "withdrawal":
|
if detail.get('type') == "withdrawal":
|
||||||
spent_amount += float(detail.get('amount'))
|
spent_amount += float(detail.get('amount'))
|
||||||
else:
|
elif detail.get('type') == "deposit":
|
||||||
print(detail)
|
spent_amount -= float(detail.get('amount'))
|
||||||
return spent_amount
|
return spent_amount
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue