mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix: clear job card actual dates when all time logs are removed
(cherry picked from commit ddb004f766)
This commit is contained in:
@@ -728,6 +728,9 @@ class JobCard(Document):
|
||||
)
|
||||
|
||||
def set_expected_and_actual_time(self):
|
||||
if not self.time_logs:
|
||||
self.actual_start_date = self.actual_end_date = None
|
||||
|
||||
for child_table, start_field, end_field, time_required in [
|
||||
("scheduled_time_logs", "expected_start_date", "expected_end_date", "time_required"),
|
||||
("time_logs", "actual_start_date", "actual_end_date", "total_time_in_mins"),
|
||||
|
||||
Reference in New Issue
Block a user