Skip to content

Commit

Permalink
fix: improved the conditions for determining voucher subtypes
Browse files Browse the repository at this point in the history
(cherry picked from commit 00eee16)
  • Loading branch information
ljain112 authored and mergify[bot] committed Nov 8, 2024
1 parent 47a8fc2 commit 58ca4a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,11 @@ def get_voucher_subtype(self):
return "Purchase Return"
elif self.doctype == "Delivery Note" and self.is_return:
return "Sales Return"
elif (self.doctype == "Sales Invoice" and self.is_return) or self.doctype == "Purchase Invoice":
elif self.doctype == "Sales Invoice" and self.is_return:
return "Credit Note"
elif (self.doctype == "Purchase Invoice" and self.is_return) or self.doctype == "Sales Invoice":
elif self.doctype == "Sales Invoice" and self.is_debit_note:
return "Debit Note"
elif self.doctype == "Purchase Invoice" and self.is_return:
return "Debit Note"

return self.doctype
Expand Down

0 comments on commit 58ca4a2

Please sign in to comment.