From 8b6a20d5012f1d08e6d8d80fb3db6a863cd900d3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 22 Jan 2025 17:25:50 +0530 Subject: [PATCH] fix: precision on work order total qty (backport #45341) (#45361) fix: precision on work order total qty (#45341) * fix: precision on work order total qty * chore: linters (cherry picked from commit 53468202dec4a97f004d85e850112911b126d60d) Co-authored-by: Dany Robert --- erpnext/manufacturing/doctype/work_order/work_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 72e16ed27d4..ab9273e09cd 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -366,7 +366,7 @@ class WorkOrder(Document): if flt(self.material_transferred_for_manufacturing) > 0: status = "In Process" - total_qty = flt(self.produced_qty) + flt(self.process_loss_qty) + total_qty = flt(flt(self.produced_qty) + flt(self.process_loss_qty), self.precision("qty")) if flt(total_qty) >= flt(self.qty): status = "Completed" else: