fix: absence of rounding causing discrepancy in the valuation rate calculation (#47700)

This commit is contained in:
rohitwaghchaure
2025-05-24 17:11:12 +05:30
committed by GitHub
parent 89115688f7
commit 1e8ed22421

View File

@@ -886,6 +886,12 @@ class update_entries_after:
self.wh_data.stock_value = flt(self.wh_data.qty_after_transaction) * flt(
self.wh_data.valuation_rate
)
if sle.actual_qty < 0 and self.wh_data.qty_after_transaction != 0:
self.wh_data.valuation_rate = flt(
self.wh_data.stock_value, self.currency_precision
) / flt(self.wh_data.qty_after_transaction, self.flt_precision)
else:
self.update_queue_values(sle)