forked from mrsool/zatca
-
Notifications
You must be signed in to change notification settings - Fork 2
Debit and Credit Notes
Omar Bahareth edited this page Jul 12, 2024
·
1 revision
For debit and credit notes, the structure is largely the same and still uses the Invoice class. You need 3 extra things:
- Ensure the invoice type subcode is set according to this page
- Add an instruction_note
- Add a billing reference (reference to the original invoice the note is being issued for)
credit_note = Invoice.new(
# ... other properties
instruction_note: "Refunded because customer ordered by mistake",
# Make sure to follow this format as it is what ZATCA expects
billing_reference: "Invoice Number: 354; Invoice Issue Date: 2021-02-10",
# Either :debit or :credit
subtype: ZATCA::UBL::Invoice::INVOICE_TYPE_CODES[:credit]
)