The IRP allows an IRN to be cancelled within 24 hours of generation. After that, correct the sale with a credit note instead.
Step by step
Open the invoice
Open the invoice from Sales → Invoices. The IRN panel shows how much of the 24-hour window is left.
Click Cancel IRN
Pick the reason (duplicate, data entry mistake, order cancelled or other) and add a short remark.
Confirm
The IRP cancels the IRN and any e-way bill made from it. The invoice is marked cancelled; its number can't be used again.
After 24 hours the IRP does not allow cancellation. Raise a credit note against the invoice; Moharbill generates its IRN too.