Acquire.Accounting._transactioninfo module¶
-
class
TransactionInfo(key=None)[source]¶ Bases:
objectThis 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
-
static
from_key(key)[source]¶ Extract information from the passed object store key.
This looks for a string that is;
isoformat_datetime/UID/transactioncode
where transactioncode is a string that matches ‘2 letters followed by a number’
CL000100.005000 DR000004.234100
etc.
For sent and received receipts there are two values; the receipted value and the original estimate. These have the standard format if the values are the same, e.g.
RR000100.005000
however, they have original value T receipted value if they are different, e.g.
RR000100.005000T000090.000000
Parameters: key – Object store key
-
is_accounts_receivable()[source]¶ Return whether or not this is accounts receivable
Returns: True if this is accounts receivable, else False Return type: bool
-
is_credit()[source]¶ Return whether or not this is a credit
Returns: True if this is a credit, else False Return type: bool
-
is_debit()[source]¶ Return whether or not this is a debit
Returns: True if this is a debit, else False Return type: bool
-
is_liability()[source]¶ Return whether or not this is a liability
Returns: True if this is a liability, else False Return type: bool
-
is_received_receipt()[source]¶ Return whether or not this is a received receipt
Returns: True if this is a received receipt, else False Return type: bool
-
is_received_refund()[source]¶ Return whether or not this is a received refund
Returns: True if this is a received refund, else False Return type: bool
-
is_sent_receipt()[source]¶ Return whether or not this is a sent receipt
Returns: True if this is accounts receivable, else False Return type: bool
-
is_sent_refund()[source]¶ Return whether or not this is a sent refund
Returns: True if this is a sent refund, else False Return type: bool
-
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. This returns None if this transaction wasn’t receipted
Returns: Receipted value of Transaction Return type: Decimal
-
static