mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
fix: absence of rounding causing discrepancy in the valuation rate calculation (#47700)
This commit is contained in:
@@ -886,6 +886,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