From d262a65b00078ef2f3b8e56102820366c79aae02 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 10:42:51 +0530 Subject: [PATCH] fix: correct overlap detection in JobCard.has_overlap (backport #53473) (#53522) Co-authored-by: Sanjesh-Raju Co-authored-by: Sanjesh Co-authored-by: Tridots Tech fix: correct overlap detection in JobCard.has_overlap (#53473) --- erpnext/manufacturing/doctype/job_card/job_card.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 549493d4b92..ae60bcb1ca8 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -281,9 +281,8 @@ class JobCard(Document): # if key number reaches/crosses to production_capacity means capacity is full and overlap error generated # this will store last to_time of sequential job cards alloted_capacity = {1: time_logs[0]["to_time"]} - # flag for sequential Job card found - sequential_job_card_found = False for i in range(1, len(time_logs)): + sequential_job_card_found = False # scanning for all Existing keys for key in alloted_capacity.keys(): # if current Job Card from time is greater than last to_time in that key means these job card are sequential