(root)/ – Rev 36140
Rev 36139 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 36140 2026-04-01 19:32:02
- Author: amit
- Log message:
- Handle IRN cancellation with 24h window + Credit Note fallback
cancelInvoiceGst(invoiceNumber, reason, creditNoteNumber):
- Within 24h: cancel IRN directly (EWB auto-cancelled by NIC)
- Past 24h: generate Credit Note e-invoice (DocType=CRN) referencing original invoice
- DC invoices: cancel standalone EWB regardless of time
generateCreditNoteIrn(originalInvoice, creditNoteNo, reason):
- Same endpoint as IRN generation but DocType=CRN
- RefDtls.PrecDocDtls references original invoice number and date
- No EWB details in credit note
- IRN persisted in einvoice_details table
Sandbox verified: CRN generation works with DocType=CRN