From c46add3760f23b3563a5fcba79287d0f6ec77e23 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 10 May 2022 13:39:41 +0530 Subject: [PATCH] fix(india): invoice type for a debit note e-invoice (#30948) (cherry picked from commit 8dd046cc51b79b9c23f915862fbdfd5e1f139670) --- erpnext/regional/india/e_invoice/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index c2ff751023d0..75da981c2bcb 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -168,7 +168,12 @@ def get_doc_details(invoice): 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")