mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 03:04:34 +00:00
* fix: recursion issue while submitting work order (#40400)
(cherry picked from commit 72614bb8ff)
* chore: fix linter issue
---------
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -264,7 +264,7 @@ class JobCard(Document):
|
|||||||
if not self.has_overlap(production_capacity, time_logs):
|
if not self.has_overlap(production_capacity, time_logs):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
if self.workstation_type and time_logs:
|
if not self.workstation and self.workstation_type and time_logs:
|
||||||
if workstation_time := self.get_workstation_based_on_available_slot(time_logs):
|
if workstation_time := self.get_workstation_based_on_available_slot(time_logs):
|
||||||
self.workstation = workstation_time.get("workstation")
|
self.workstation = workstation_time.get("workstation")
|
||||||
return workstation_time
|
return workstation_time
|
||||||
@@ -420,7 +420,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:
|
||||||
|
|||||||
@@ -611,4 +611,4 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
|
|||||||
|
|
||||||
this.dialog.fields_dict.entries.grid.refresh();
|
this.dialog.fields_dict.entries.grid.refresh();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user