diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 450e973845a..bb603c7bb1b 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -687,7 +687,7 @@ def validate_due_date_with_template(posting_date, due_date, bill_date, template_ if not default_due_date: return - if default_due_date != posting_date and getdate(due_date) > getdate(default_due_date): + if getdate(default_due_date) != getdate(posting_date) and getdate(due_date) > getdate(default_due_date): if frappe.get_single_value("Accounts Settings", "credit_controller") in frappe.get_roles(): party_type = "supplier" if doctype == "Purchase Invoice" else "customer"