mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-21 18:36:30 +00:00
fix: absence of rounding causing discrepancy in the valuation rate calculation (backport #47700) (#47711)
fix: absence of rounding causing discrepancy in the valuation rate calculation (#47700)
(cherry picked from commit 1e8ed22421)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -882,6 +882,12 @@ class update_entries_after:
|
|||||||
self.wh_data.stock_value = flt(self.wh_data.qty_after_transaction) * flt(
|
self.wh_data.stock_value = flt(self.wh_data.qty_after_transaction) * flt(
|
||||||
self.wh_data.valuation_rate
|
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:
|
else:
|
||||||
self.update_queue_values(sle)
|
self.update_queue_values(sle)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user