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:
pandiyan
2026-08-10 16:02:39 +05:30
committed by Mergify
parent ee5316ecd0
commit 822e6d8924

View File

@@ -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()