fix: validate if from and to time are present on submission of job card (#47325)

(cherry picked from commit 7499c25a3c)
This commit is contained in:
Mihir Kandoi
2025-04-29 16:21:41 +05:30
committed by Mergify
parent 2edd12b26d
commit d640c79c1c

View File

@@ -705,6 +705,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(