From 1dc3829242537eee505649b537d78fc0e2372c0e Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 25 Oct 2020 20:42:07 +0100 Subject: [PATCH] Support deposits getting the total. Budgets don't support deposits, so this is dead code (for now). --- firefly/budgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefly/budgets.py b/firefly/budgets.py index c58fa4a..3c62abb 100644 --- a/firefly/budgets.py +++ b/firefly/budgets.py @@ -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