fix: improved the conditions for determining voucher subtypes

This commit is contained in:
ljain112
2024-09-18 19:38:14 +05:30
parent 6d59039955
commit 00eee16190

View File

@@ -1070,9 +1070,11 @@ class AccountsController(TransactionBase):
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