From 822e6d89247cfb8d42ffcaf0101f89766b789505 Mon Sep 17 00:00:00 2001 From: pandiyan Date: Mon, 10 Aug 2026 16:02:39 +0530 Subject: [PATCH] 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 422a9161ddb34a542a9fb226e3250f7ff6f4d8cb) --- erpnext/manufacturing/doctype/workstation/workstation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/workstation/workstation.py b/erpnext/manufacturing/doctype/workstation/workstation.py index 772318a6446..047cb4e2c7f 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation.py +++ b/erpnext/manufacturing/doctype/workstation/workstation.py @@ -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()