Skip to content

Commit

Permalink
Merge pull request frappe#30949 from frappe/mergify/bp/version-13-hot…
Browse files Browse the repository at this point in the history
…fix/pr-30948

fix(india): invoice type for a debit note e-invoice (backport frappe#30948)
  • Loading branch information
deepeshgarg007 authored May 10, 2022
2 parents 7bd5b2b + c46add3 commit 3373ce5
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 3373ce5

Please sign in to comment.