fix: incorrect stock value difference when stock move from negative to positive (#18887)

This commit is contained in:
rohitwaghchaure 2019-09-05 12:18:33 +05:30 committed by Nabin Hait
parent 1635967c4e
commit 805b8634da

View File

@ -181,10 +181,7 @@ class update_entries_after(object):
# rounding as per precision
self.stock_value = flt(self.stock_value, self.precision)
if self.prev_stock_value < 0 and self.stock_value >= 0 and sle.voucher_type != 'Stock Reconciliation':
stock_value_difference = sle.actual_qty * self.valuation_rate
else:
stock_value_difference = self.stock_value - self.prev_stock_value
stock_value_difference = self.stock_value - self.prev_stock_value
self.prev_stock_value = self.stock_value