mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 07:01:56 +00:00
fix: convert hours to minutes in workstation complete_job
`time_diff_in_hours` returns hours, so `time_in_mins` needs `* 60`, not `/ 60`. Matches `Job Card.validate_time_log_row`. No behaviour change: the `doc.save()` on the next line runs Job Card's `validate`, which recomputes `time_in_mins` correctly before the row is written. This only stops the expression from reading as a bug.
This commit is contained in:
@@ -242,7 +242,7 @@ class Workstation(Document):
|
||||
for row in doc.time_logs:
|
||||
if not row.to_time:
|
||||
row.to_time = to_time
|
||||
row.time_in_mins = time_diff_in_hours(row.to_time, row.from_time) / 60
|
||||
row.time_in_mins = time_diff_in_hours(row.to_time, row.from_time) * 60
|
||||
row.completed_qty = qty
|
||||
|
||||
doc.save()
|
||||
|
||||
Reference in New Issue
Block a user