mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 06:31:48 +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.
(cherry picked from commit 422a9161dd)
This commit is contained in:
@@ -232,7 +232,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