biweeklybudget.models.transaction module¶
-
class
biweeklybudget.models.transaction.
Transaction
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
,biweeklybudget.models.base.ModelAsDict
-
_sa_class_manager
= {'account': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b043b0>, 'account_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04bf0>, 'actual_amount': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b048f0>, 'budget': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b045f0>, 'budget_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04d70>, 'budgeted_amount': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b049b0>, 'date': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04830>, 'description': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04a70>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04770>, 'notes': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04b30>, 'scheduled_trans': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04530>, 'scheduled_trans_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04cb0>, 'transfer': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b046b0>, 'transfer_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object at 0x7f8004b04e30>}¶
-
account_id
¶ ID of the account this transaction is against
-
actual_amount
¶ Actual amount of the transaction
-
budget_id
¶ ID of the Budget this transaction is against
-
budgeted_amount
¶ Budgeted amount of the transaction
-
date
¶ date of the transaction
-
description
¶ description
-
id
¶ Primary Key
-
notes
¶ free-form notes
-
scheduled_trans
¶ Relationship - the
ScheduledTransaction
this Transaction was created from; set when a scheduled transaction is converted to a real one
-
scheduled_trans_id
¶ ID of the ScheduledTransaction this Transaction was created from; set when a scheduled transaction is converted to a real one
-
transfer
¶ Relationship - the
Transaction
that makes up the other half/side of a transfer, if this transaction was for a transfer.
-
transfer_id
¶ If the transaction is one half of a transfer, the Transaction ID of the other half/side of the transfer.
-
static
unreconciled
(db)[source]¶ Return a query to match all unreconciled Transactions.
Parameters: db (sqlalchemy.orm.session.Session) – active database session to use for queries Returns: query to match all unreconciled Transactions Return type: sqlalchemy.orm.query.Query
-