From 482a7962129adc915fd9261ada5f6dc98c76153c Mon Sep 17 00:00:00 2001 From: Rehan Ansari Date: Tue, 14 Oct 2025 23:38:17 +0530 Subject: [PATCH] fix: fiscal year overlap validation for company-specific years (cherry picked from commit 57aaf34d3e97b6fa0c6c9bc7ece94eec26940e92) --- erpnext/accounts/doctype/fiscal_year/fiscal_year.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py index 25aa3f30363..f97fcf1ec34 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py @@ -99,7 +99,7 @@ class FiscalYear(Document): ) overlap = False - if not self.get("companies") or not company_for_existing: + if not self.get("companies") and not company_for_existing: overlap = True for d in self.get("companies"):