Skip to content

Commit

Permalink
fix(india): invoice type for a debit note e-invoice (frappe#30948)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8dd046c)
  • Loading branch information
nextchamp-saqib authored and mergify[bot] committed May 10, 2022
1 parent 7bd5b2b commit c46add3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion erpnext/regional/india/e_invoice/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit c46add3

Please sign in to comment.