mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 16:40:19 +00:00
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:
@@ -888,7 +888,7 @@ def make_bundle_for_material_transfer(**kwargs):
|
|||||||
row.stock_value_difference = abs(row.stock_value_difference)
|
row.stock_value_difference = abs(row.stock_value_difference)
|
||||||
if kwargs.type_of_transaction == "Outward":
|
if kwargs.type_of_transaction == "Outward":
|
||||||
row.qty *= -1
|
row.qty *= -1
|
||||||
row.stock_value_difference *= row.stock_value_difference
|
row.stock_value_difference *= -1
|
||||||
row.is_outward = 1
|
row.is_outward = 1
|
||||||
|
|
||||||
row.warehouse = kwargs.warehouse
|
row.warehouse = kwargs.warehouse
|
||||||
|
|||||||
Reference in New Issue
Block a user