Models (Statements)

StatementImport

class hordak.models.StatementImport(*args, **kwargs)

Records an import of a bank statement

uuid

UUID for statement import. Use to prevent leaking of IDs (if desired).

Type:

UUID

timestamp

The datetime when the object was created.

Type:

datetime

bank_account

The account the import is for (should normally point to an asset account which represents your bank account)

Type:

Account

exception DoesNotExist
exception MultipleObjectsReturned

StatementLine

class hordak.models.StatementLine(*args, **kwargs)

Records a single imported bank statement line

A StatementLine is purely a utility to aid in the creation of transactions (in the process known as reconciliation). StatementLines have no impact on account balances.

However, the StatementLine.create_transaction() method can be used to create a transaction based on the information in the StatementLine.

uuid

UUID for statement line. Use to prevent leaking of IDs (if desired).

Type:

UUID

timestamp

The datetime when the object was created.

Type:

datetime

date

The date given by the statement line

Type:

date

statement_import

The import to which the line belongs

Type:

StatementImport

amount

The amount for the statement line, positive or negative.

Type:

Decimal

description

Any description/memo information provided

Type:

str

transaction

Optionally, the transaction created for this statement line. This normally occurs during reconciliation. See also StatementLine.create_transaction().

Type:

Transaction

property is_reconciled

Has this statement line been reconciled?

Determined as True if transaction has been set.

Returns:

True if reconciled, False if not.

Return type:

bool

create_transaction(to_account)

Create a transaction for this statement amount and account, into to_account

This will also set this StatementLine’s transaction attribute to the newly created transaction.

Parameters:

to_account (Account) – The account the transaction is into / out of.

Returns:

The newly created (and committed) transaction.

Return type:

Transaction

exception DoesNotExist
exception MultipleObjectsReturned