Support deposits getting the total.

Budgets don't support deposits, so this is dead code (for now).
This commit is contained in:
chris 2020-10-25 20:42:07 +01:00
parent ed8413eaae
commit 1dc3829242
1 changed files with 2 additions and 2 deletions

View File

@ -66,8 +66,8 @@ def _get_current_spent_amount(budget_id):
for detail in transaction.get('attributes').get('transactions'):
if detail.get('type') == "withdrawal":
spent_amount += float(detail.get('amount'))
else:
print(detail)
elif detail.get('type') == "deposit":
spent_amount -= float(detail.get('amount'))
return spent_amount