mixins.assigning

Provides functionality to assignable Transactions for clearing clearable Transactions.

Module Contents

Classes

AssigningMixin

This class provides assignable Transactions functionality for

class mixins.assigning.AssigningMixin

This class provides assignable Transactions functionality for clearing clearable Transactions.

balance(session) decimal.Decimal
Gets how much of the Transaction amount is remaining available for assigning

to clearable Transactions.

Parameters:

session (Session) – The accounting session to which the Transaction belongs.

Returns:

The difference between the Transaction amount and the total amount of assignments made to it.

Return type:

Decimal

assignments(session) list

Gets the assignments made on the Transaction.

Parameters:

session (Session) – The accounting session to which the Transaction belongs.

Returns:

A List of assignments made for the Transaction.

unassign(session) None

Removes all assignments made to this Transaction.

Parameters:

session (Session) – The accounting session to which the Transaction belongs.

Returns:

None

bulk_assign(session) None

Assigns the Transaction’s amount to all outstanding clearable Transactions for the main account on a FIFO basis.

Parameters:

session (Session) – The accounting session to which the Transaction belongs.

Returns:

None