Acquire.Accounting._debitnote module

class DebitNote(transaction=None, account=None, authorisation=None, is_provisional=False, receipt_by=None, receipt=None, refund=None, authorisation_resource=None, bucket=None)[source]

Bases: object

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

account_uid()[source]

Return the UID of the account that was debited

Returns:UID of account that was debited
Return type:str
authorisation()[source]

Return the authorisation that was used successfully to withdraw value from the debited account

Returns:Authorisation used to withdraw value from account
Return type:Authorisation
datetime()[source]

Return the datetime for when value was debited from the account

Returns:When value was debited from account
Return type:datetime
static from_data(data)[source]

Return a DebitNote that has been extracted from the passed json-decoded dictionary

Parameters:data (dict) – Dictionary from which to create object
Returns:Created from dictionary
Return type:DebitNote
is_null()[source]

Return whether or not this is a null note

Returns:True if note not null, else False
Return type:bool
is_provisional()[source]

Return whether or not the debit was provisional. Provisional debits are listed as liabilities

Returns:True if debit was provisional, else False
Return type:bool
needs_receipting()[source]

Return whether or not this DebitNote transaction needs receipting - if it does, then it must be receipted by the CreditNote before DebitNote.receipt_by().

Returns:True if note needs receipting, else False
Return type:bool
receipt_by()[source]

Return the datetime by which this DebitNote must be receipted via the CreditNote, else the transaction will be automatically refunded. This will return ‘None’ if the transaction has already been receipted or it wasn’t provisional

Returns:Date by which a receipt must be created
Return type:datetime
to_data()[source]

Return this DebitNote as a dictionary that can be encoded as json

Returns:Dictionary to be converted to JSON
Return type:dict
transaction()[source]

Return the transaction related to this debit note

Returns:Transaction related to this credit note
Return type:Transaction
uid()[source]

Return the UID for this note. This has the format dd:mm:yyyy/unique_string

Returns:UID for this note
Return type:str
value()[source]

Return the value of this note

Returns:Value of this note
Return type:Decimal