fix(india): invoice type for a debit note e-invoice (#30948)

This commit is contained in:
Saqib Ansari 2022-05-10 13:39:41 +05:30 committed by GitHub
parent 3b6752dc8b
commit 8dd046cc51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,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")