[fix]Stock UOM Replace Utility: Multiply Qty after Transaction by conversion factor as well, as there is no qty mentioned for stock reconciliation
This commit is contained in:
parent
ac35b8af55
commit
1b6fd1ba5b
@ -88,7 +88,10 @@ def update_stock_ledger_entry(item_code, new_stock_uom, conversion_factor):
|
|||||||
|
|
||||||
if flt(conversion_factor) != flt(1):
|
if flt(conversion_factor) != flt(1):
|
||||||
frappe.db.sql("""update `tabStock Ledger Entry`
|
frappe.db.sql("""update `tabStock Ledger Entry`
|
||||||
set stock_uom = %s, actual_qty = ifnull(actual_qty,0) * %s
|
set
|
||||||
|
stock_uom = %s,
|
||||||
|
actual_qty = ifnull(actual_qty,0) * %s,
|
||||||
|
qty_after_transaction = ifnull(qty_after_transaction, 0) * %s
|
||||||
where item_code = %s""",
|
where item_code = %s""",
|
||||||
(new_stock_uom, conversion_factor, item_code))
|
(new_stock_uom, conversion_factor, item_code))
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user