Acquire.Accounting._receipt module

class Receipt(credit_note=None, authorisation=None, receipted_value=None)[source]

Bases: object

This class holds the receipt for a provisional transaction. This is sent by the credited account to receipt that the service has been performed, and thus payment that is held as liability should now be paid. OR it sends back the fact that the service was not performed, and so the refund should be issued

authorisation()[source]

Return the authorisation for the receipt

static create(credit_notes, authorisation, receipted_value=None)[source]

Construct a series of receipts from the passed credit notes, each of which is authorised using the passed authorisation. If ‘receipted_value’ is specified, then the sum total of receipts will equal ‘receipted_value’. This cannot be greater than the sum of the passed credit notes. If it is less then the value, then the difference is subtracted from the first receipts returned

credit_account_uid()[source]

Return the UID of the account to which this receipt will credit value

credit_note()[source]

Return the credit note that this is a receipt for

debit_account_uid()[source]

Return the UID of the account from which this receipt will debit value

debit_note_uid()[source]

Return the UID of the debit note that this is a receipt for

static from_data(data)[source]

Return a Receipt from the passed json-decoded dictionary

is_null()[source]

Return whether or not this Receipt is null

provisional_value()[source]

Return the original (provisional) value of the transaction

receipted_value()[source]

Return the receipted value. This is guaranteed to be less than or equal to the provisional value in the attached CreditNote

to_data()[source]

Return the data for this object as a dictionary that can be serialised to json

transaction()[source]

Return a transaction that corresponds to the real transfer of value between the debit and credit accounts. The value of the transaction is the actual receipted value

transaction_uid()[source]

Return the UID of the provisional transaction for which this is the receipt. The transaction UID is the same as the UID for the original debit note

value()[source]

Return the original (provisional) value of the transaction