fix: precision issue for valuation rate calculation

(cherry picked from commit c92a06d77d)
This commit is contained in:
Rohit Waghchaure
2025-09-14 11:22:14 +05:30
committed by Mergify
parent f523413bce
commit 7a8cd47259

View File

@@ -883,10 +883,7 @@ class update_entries_after:
self.wh_data.valuation_rate
)
if (
sle.actual_qty < 0
and flt(self.wh_data.qty_after_transaction, self.flt_precision) != 0
):
if flt(self.wh_data.qty_after_transaction, self.flt_precision) != 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)