fix: incorrect stock value difference for adjustment entry

(cherry picked from commit df83e427a3)
This commit is contained in:
Rohit Waghchaure
2025-02-19 16:02:39 +05:30
committed by Mergify
parent 5a17171bd1
commit 96d44e362d

View File

@@ -883,6 +883,10 @@ class update_entries_after:
if not sle.is_adjustment_entry:
sle.stock_value_difference = stock_value_difference
elif sle.is_adjustment_entry and not self.args.get("sle_id"):
sle.stock_value_difference = get_stock_value_difference(
sle.item_code, sle.warehouse, sle.posting_date, sle.posting_time, sle.voucher_no
)
sle.doctype = "Stock Ledger Entry"
frappe.get_doc(sle).db_update()