Acquire.Accounting._transactioninfo module

class TransactionInfo(key)[source]

Bases: object

This class is used to encode and extract the type of transaction and value to/from an object store key

static encode(code, value, receipted_value=None)[source]

Encode the passed code and value into a simple string that can be used as part of an object store key. If ‘receipted_value’ is passed, then encode the receipted value of the provisional transaction too

is_accounts_receivable()[source]

Return whether or not this is accounts receivable

is_credit()[source]

Return whether or not this is a credit

is_debit()[source]

Return whether or not this is a debit

is_liability()[source]

Return whether or not this is a liability

is_received_receipt()[source]

Return whether or not this is a received receipt

is_received_refund()[source]

Return whether or not this is a received refund

is_sent_receipt()[source]

Return whether or not this is a sent receipt

is_sent_refund()[source]

Return whether or not this is a sent refund

receipted_value()[source]

Return the receipted value of the transaction. This may be different to value() when the transaction was provisional, and the receipted value is less than the provisional value

value()[source]

Return the value of the transaction

class TransactionCode[source]

Bases: enum.Enum

An enumeration.

ACCOUNT_RECEIVABLE = 'AR'
CREDIT = 'CR'
CURRENT_LIABILITY = 'CL'
DEBIT = 'DR'
RECEIVED_RECEIPT = 'RR'
RECEIVED_REFUND = 'RF'
SENT_RECEIPT = 'SR'
SENT_REFUND = 'SF'