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