From eff29565ae6e9dfee34eb361e01d31078b9ff0aa Mon Sep 17 00:00:00 2001 From: pandiyan Date: Sun, 9 Aug 2026 13:20:07 +0530 Subject: [PATCH] fix: negate stock value difference for outward transfer bundles make_bundle_for_material_transfer squares stock_value_difference for outward rows instead of negating it. multiply by -1, matching the qty negation on the line above. no behaviour change: set_incoming_rate and calculate_qty_and_amount both recompute the field from qty * incoming_rate before the bundle is saved. --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 64d2a0bd62a..c01b328c68e 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -888,7 +888,7 @@ def make_bundle_for_material_transfer(**kwargs): row.stock_value_difference = abs(row.stock_value_difference) if kwargs.type_of_transaction == "Outward": row.qty *= -1 - row.stock_value_difference *= row.stock_value_difference + row.stock_value_difference *= -1 row.is_outward = 1 row.warehouse = kwargs.warehouse