Acquire.Accounting._creditnote module¶
-
class
CreditNote(debit_note=None, account=None, receipt=None, refund=None, bucket=None)[source]¶ Bases:
objectThis 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
Returns: Account UID Return type: str
-
datetime()[source]¶ Return the datetime for this credit note
Returns: Datetime for this credit note Return type: datetime
-
debit_account_uid()[source]¶ Return the UID of the account from which the value was debited
Returns: UID of account from which value was debited Return type: str
-
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)
Returns: UID of the debit note to match this credit note Return type: str
-
static
from_data(data)[source]¶ Construct and return a new CreditNote from the passed json-decoded dictionary
Parameters: data (dict) – JSON serialised dictionary of object Returns: CreditNote created from JSON data Return type: CreditNote
-
is_null()[source]¶ Return whether or not this note is null
Returns: True if note is null, else False Return type: bool
-
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())
Returns: True if note is provisional, else False Return type: bool
-
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
Returns: True if CreditNote needs receipting, else False Return type: bool
-
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
Returns: Date by which the credit note must be receipted Return type: datetime
-
to_data()[source]¶ Return this credit note as a dictionary that can be encoded to JSON
Returns: Dictionary of object to be encoded to JSON Return type: dict
-