mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
fix: error because of non-mandatory fields
This commit is contained in:
@@ -18,6 +18,7 @@ class JobCard(Document):
|
||||
self.total_completed_qty = 0.0
|
||||
self.total_time_in_mins = 0.0
|
||||
|
||||
if self.get('time_logs'):
|
||||
for d in self.get('time_logs'):
|
||||
if get_datetime(d.from_time) > get_datetime(d.to_time):
|
||||
frappe.throw(_("Row {0}: From time must be less than to time").format(d.idx))
|
||||
@@ -112,7 +113,9 @@ class JobCard(Document):
|
||||
for_quantity += doc.total_completed_qty
|
||||
time_in_mins += doc.total_time_in_mins
|
||||
for time_log in doc.time_logs:
|
||||
if time_log.from_time:
|
||||
from_time_list.append(time_log.from_time)
|
||||
if time_log.to_time:
|
||||
to_time_list.append(time_log.to_time)
|
||||
|
||||
if for_quantity:
|
||||
|
||||
Reference in New Issue
Block a user