From 42f6cb40d17f8a6879b56c61a539a32e6a9f78b2 Mon Sep 17 00:00:00 2001 From: ervishnucs Date: Wed, 6 May 2026 17:08:27 +0530 Subject: [PATCH] fix: normalize date comparison to avoid datatype mismatch (cherry picked from commit 01e382b1068db6940e142bec0dcebb70eb4e0f59) --- erpnext/accounts/party.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 9cc7aca9fc1..120d6bb2c96 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -677,7 +677,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"