Skip to content

Commit

Permalink
fix: incorrect stock value difference for adjustment entry
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure committed Feb 19, 2025
1 parent a81867b commit df83e42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erpnext/stock/stock_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,10 @@ def process_sle(self, sle):

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()
Expand Down

0 comments on commit df83e42

Please sign in to comment.