fix(stock): update voucher valuaion rate in sle (#55960)

This commit is contained in:
Sudharsanan Ashok
2026-06-21 21:50:19 +05:30
committed by GitHub
parent 0ff0343588
commit 130c2594e1

View File

@@ -925,6 +925,16 @@ class update_entries_after:
and not has_dimensions
):
# assert
if (
sle.voucher_detail_no
and self.repost_doc
and self.repost_doc.get("recalculate_valuation_rate")
):
source_rate = frappe.get_cached_value(
"Stock Reconciliation Item", sle.voucher_detail_no, "valuation_rate"
)
if source_rate:
sle.valuation_rate = source_rate
self.wh_data.valuation_rate = sle.valuation_rate
self.wh_data.qty_after_transaction = sle.qty_after_transaction
self.wh_data.stock_value = flt(self.wh_data.qty_after_transaction) * flt(