biweeklybudget.models.utils module¶
-
biweeklybudget.models.utils.
do_budget_transfer
(db_sess, txn_date, amount, account, from_budget, to_budget, notes=None)[source]¶ Transfer a given amount from
from_budget
toto_budget
ontxn_date
. This method does NOT commit database changes. There are places where we rely on this function not committing changes.Parameters: - db_sess (sqlalchemy.orm.session.Session) – active database session to use for queries
- txn_date (datetime.date) – date to make the transfer Transactions on
- amount (float) – amount of money to transfer
- account (biweeklybudget.models.account.Account) –
- from_budget (biweeklybudget.models.budget_model.Budget) –
- to_budget (biweeklybudget.models.budget_model.Budget) –
- notes (str) – Notes to add to the Transaction
Returns: list of Transactions created for the transfer
Return type: list
ofTransaction
objects