Add credit month in validation

This commit is contained in:
Jigar Tarpara 2019-02-19 10:21:01 +05:30
parent 56cbfe4bb0
commit 1ac17ec1c4

View File

@ -32,7 +32,7 @@ class PaymentTermsTemplate(Document):
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),