Skip to content

Commit

Permalink
fix: reset stock value if no qty
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Feb 23, 2022
1 parent 6d354ed commit 37ba366
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/stock/stock_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ def process_sle(self, sle):

# rounding as per precision
self.wh_data.stock_value = flt(self.wh_data.stock_value, self.precision)
if not self.wh_data.qty_after_transaction:
self.wh_data.stock_value = 0.0
stock_value_difference = self.wh_data.stock_value - self.wh_data.prev_stock_value
self.wh_data.prev_stock_value = self.wh_data.stock_value

Expand Down

0 comments on commit 37ba366

Please sign in to comment.