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
  • Loading branch information
nextchamp-saqib authored May 10, 2022
1 parent 3b6752d commit 8dd046c
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 @@ -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")
Expand Down

0 comments on commit 8dd046c

Please sign in to comment.