Skip to content

Commit

Permalink
fix: improved the conditions for determining voucher subtypes
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Sep 18, 2024
1 parent 6d59039 commit 00eee16
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 @@ -1070,9 +1070,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 00eee16

Please sign in to comment.