Merge pull request #16717 from jigartarpara/fix_payment_term_template
fix: Add credit month in validation
diff --git a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py
index 7042df0..2b2b6af 100644
--- a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py
+++ b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py
@@ -32,7 +32,7 @@
def check_duplicate_terms(self):
terms = []
for term in self.terms:
- term_info = (term.credit_days, term.due_date_based_on)
+ term_info = (term.credit_days, term.credit_months, term.due_date_based_on)
if term_info in terms:
frappe.msgprint(
_('The Payment Term at row {0} is possibly a duplicate.').format(term.idx),