Acquire.Accounting._creditnote module

class CreditNote(debit_note=None, account=None, receipt=None, refund=None, bucket=None)[source]

Bases: object

This class holds all of the information about a completed credit. This is combined with a debit note of equal value to form a transaction record

account_uid()[source]

Return the UID of the account to which the value was credited

credit_account_uid()[source]

Synonym for self.account_uid()

datetime()[source]

Return the datetime for this credit note

debit_account_uid()[source]

Return the UID of the account from which the value was debited

debit_note_uid()[source]

Return the UID of the debit note that matches this credit note. While at the moment only a single credit note matches a debit note, it may be in the future that we divide a credit over several accounts (and thus several credit notes)

static from_data(data)[source]

Construct and return a new CreditNote from the passed json-decoded dictionary

is_null()[source]

Return whether or not this note is null

is_provisional()[source]

Return whether or not this credit note is provisional (i.e. the value will only be transferred on completion of work and provision of a receipt. Note that the value will only be transferred if this CreditNote is receipted before CreditNote.receipt_by())

needs_receipting()[source]

Return whether or not this CreditNote needs to be receipted. If so, then the funds are only held provisionally, and must be receipted by CreditNote.receipt_by() else they will be returned to the DebitNote account

receipt_by()[source]

Return the datetime by which this credit note must be receipted, or else the funds will be returned. This will return None if the CreditNote does not need receipting

to_data()[source]

Return this credit note as a dictionary that can be encoded to json

uid()[source]

Return the UID of this credit note. This will not match the debit note UID - you need to use debit_note_uid() to get the UID of the debit note that matches this credit note

value()[source]

Return the value of this note. This may be less than the corresponding debit note if only part of the value of the debit note is transferred into the account