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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user