From 838d2452153d6f331520d3c3e14f2aa4b6fe07a0 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 30 Jan 2026 10:19:35 +0530 Subject: [PATCH] fix: add precision to rejected batch no qty calculation --- erpnext/controllers/stock_controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index aa09f0ca956..f2e93a4e933 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -552,7 +552,10 @@ class StockController(AccountsController): if is_rejected: serial_nos = row.get("rejected_serial_no") type_of_transaction = "Inward" if not self.is_return else "Outward" - qty = row.get("rejected_qty") * row.get("conversion_factor", 1.0) + qty = flt( + row.get("rejected_qty") * row.get("conversion_factor", 1.0), + frappe.get_precision("Serial and Batch Entry", "qty"), + ) warehouse = row.get("rejected_warehouse") if (