fix: better error message due date (#21366)

This commit is contained in:
Michelle Alva
2020-04-22 11:37:09 +05:30
committed by GitHub
parent 4daab871d5
commit 499f9198b9

View File

@@ -834,7 +834,7 @@ class AccountsController(TransactionBase):
for d in self.get("payment_schedule"): for d in self.get("payment_schedule"):
if self.doctype == "Sales Order" and getdate(d.due_date) < getdate(self.transaction_date): if self.doctype == "Sales Order" and getdate(d.due_date) < getdate(self.transaction_date):
frappe.throw(_("Row {0}: Due Date cannot be before posting date").format(d.idx)) frappe.throw(_("Row {0}: Due Date in the Payment Terms table cannot be before Posting Date").format(d.idx))
elif d.due_date in dates: elif d.due_date in dates:
li.append(_("{0} in row {1}").format(d.due_date, d.idx)) li.append(_("{0} in row {1}").format(d.due_date, d.idx))
dates.append(d.due_date) dates.append(d.due_date)