From 7499c25a3c7045e14ca0c4bd3985e7f408e3eead Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 29 Apr 2025 16:21:41 +0530 Subject: [PATCH] fix: validate if from and to time are present on submission of job card (#47325) --- erpnext/manufacturing/doctype/job_card/job_card.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index bc8c2795b06..5efcbcc9fb5 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -740,6 +740,12 @@ class JobCard(Document): bold("Job Card"), get_link_to_form("Job Card", self.name) ) ) + else: + for row in self.time_logs: + if not row.from_time or not row.to_time: + frappe.throw( + _("Row #{0}: From Time and To Time fields are required").format(row.idx), + ) precision = self.precision("total_completed_qty") total_completed_qty = flt(