diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 0f22d1fa242e645abf326ef04f8e211ec5ff5123..2281a5481f8a74452f6bdbb3b875a04e36c99295 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -680,9 +680,7 @@ def get_due_date_from_template(template_name, posting_date, bill_date): return due_date -def validate_due_date( - posting_date, due_date, party_type, party, company=None, bill_date=None, template_name=None -): +def validate_due_date(posting_date, due_date, bill_date=None, template_name=None): if getdate(due_date) < getdate(posting_date): frappe.throw(_("Due Date cannot be before Posting / Supplier Invoice Date")) else: diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 7182622e421182381c748ed8cdf467eb434c36df..8a85c077c4cf57f87c3aa1c3de9871db980d2f48 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -542,18 +542,12 @@ class AccountsController(TransactionBase): validate_due_date( self.posting_date, self.due_date, - "Customer", - self.customer, - self.company, self.payment_terms_template, ) elif self.doctype == "Purchase Invoice": validate_due_date( self.bill_date or self.posting_date, self.due_date, - "Supplier", - self.supplier, - self.company, self.bill_date, self.payment_terms_template, )