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.
This commit is contained in:
pandiyan
2026-08-09 13:20:07 +05:30
parent 691c341edd
commit eff29565ae

View File

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