Acquire.Accounting._transaction module

class Transaction(value=0, description=None)[source]

Bases: object

This class provides basic information about a transaction - namely just the value (always positive) and what the transaction is for

description()[source]

Return the description of this transaction

static from_data(data)[source]

Return a newly constructed transaction from the passed dictionary that has been decoded from json

is_null()[source]

Return whether or not this is a null transaction

static maximum_transaction_value()[source]

Return the maximum value for a single transaction. Currently this is 999999.999999 so that a transaction fits into a f013.6 string

static round(value)[source]

Round the passed floating point value to the precision level of the transaction (currently 6 decimal places)

static split(value, description)[source]

Split the passed transaction described by ‘description’ with value ‘value’ into a list of transactions that fit the maximum transaction limit.

to_data()[source]

Return this transaction as a dictionary that can be encoded to json

value()[source]

Return the value of this transaction. This will be always greater than or equal to zero