* fix: recursion issue while submitting work order (#40400)
(cherry picked from commit 72614bb8ff)
# Conflicts:
# erpnext/manufacturing/doctype/job_card/job_card.py
* chore: fix conflicts
---------
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -215,7 +215,7 @@ class JobCard(Document):
|
|||||||
if not self.has_overlap(production_capacity, existing_time_logs):
|
if not self.has_overlap(production_capacity, existing_time_logs):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
if self.workstation_type:
|
if not self.workstation and self.workstation_type:
|
||||||
if workstation := self.get_workstation_based_on_available_slot(existing_time_logs):
|
if workstation := self.get_workstation_based_on_available_slot(existing_time_logs):
|
||||||
self.workstation = workstation
|
self.workstation = workstation
|
||||||
return None
|
return None
|
||||||
@@ -305,7 +305,7 @@ class JobCard(Document):
|
|||||||
if not workstation_doc.working_hours or cint(
|
if not workstation_doc.working_hours or cint(
|
||||||
frappe.db.get_single_value("Manufacturing Settings", "allow_overtime")
|
frappe.db.get_single_value("Manufacturing Settings", "allow_overtime")
|
||||||
):
|
):
|
||||||
if get_datetime(row.planned_end_time) < get_datetime(row.planned_start_time):
|
if get_datetime(row.planned_end_time) <= get_datetime(row.planned_start_time):
|
||||||
row.planned_end_time = add_to_date(row.planned_start_time, minutes=row.time_in_mins)
|
row.planned_end_time = add_to_date(row.planned_start_time, minutes=row.time_in_mins)
|
||||||
row.remaining_time_in_mins = 0.0
|
row.remaining_time_in_mins = 0.0
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user