Merge pull request #4068 from anandpdoshi/due-date-validation
if no party, don't validate due date based on credit days
This commit is contained in:
commit
6f39300d43
@ -267,6 +267,9 @@ def validate_due_date(posting_date, due_date, party_type, party, company):
|
||||
frappe.throw(_("Due Date cannot be before Posting Date"))
|
||||
else:
|
||||
default_due_date = get_due_date(posting_date, party_type, party, company)
|
||||
if not default_due_date:
|
||||
return
|
||||
|
||||
if default_due_date != posting_date and getdate(due_date) > getdate(default_due_date):
|
||||
is_credit_controller = frappe.db.get_single_value("Accounts Settings", "credit_controller") in frappe.get_roles()
|
||||
if is_credit_controller:
|
||||
|
Loading…
x
Reference in New Issue
Block a user