fix(india): invoice type for a debit note e-invoice (#30948)
diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py
index 417f883..ed1002a 100644
--- a/erpnext/regional/india/e_invoice/utils.py
+++ b/erpnext/regional/india/e_invoice/utils.py
@@ -167,7 +167,12 @@
title=_("Not Allowed"),
)
- invoice_type = "CRN" if invoice.is_return else "INV"
+ if invoice.is_return:
+ invoice_type = "CRN"
+ elif invoice.is_debit_note:
+ invoice_type = "DBN"
+ else:
+ invoice_type = "INV"
invoice_name = invoice.name
invoice_date = format_date(invoice.posting_date, "dd/mm/yyyy")