diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index c31d6404e2d5f3770014986cdbb2881c3c9cc2cb..8519021a1a9e2f9f3e16508d53a5a6f69843a87d 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -885,7 +885,10 @@ class update_entries_after: self.wh_data.valuation_rate ) - if sle.actual_qty < 0 and self.wh_data.qty_after_transaction != 0: + if ( + sle.actual_qty < 0 + and 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)