mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-12 11:25:09 +00:00
Co-authored-by: Sanjesh-Raju <sanjesh@tridotstech.com> Co-authored-by: Sanjesh <rsanjesh64@gmail.com> Co-authored-by: Tridots Tech <info@tridotstech.com> fix: correct overlap detection in JobCard.has_overlap (#53473)
This commit is contained in:
@@ -281,9 +281,8 @@ class JobCard(Document):
|
|||||||
# if key number reaches/crosses to production_capacity means capacity is full and overlap error generated
|
# 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
|
# this will store last to_time of sequential job cards
|
||||||
alloted_capacity = {1: time_logs[0]["to_time"]}
|
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)):
|
for i in range(1, len(time_logs)):
|
||||||
|
sequential_job_card_found = False
|
||||||
# scanning for all Existing keys
|
# scanning for all Existing keys
|
||||||
for key in alloted_capacity.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
|
# if current Job Card from time is greater than last to_time in that key means these job card are sequential
|
||||||
|
|||||||
Reference in New Issue
Block a user