mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
Merge pull request #18886 from rohitwaghchaure/fix_incorrect_stock_valuation_calculate_when_qty_from_negative_to_stock
fix: incorrect stock value difference when stock move from negative to positive
This commit is contained in:
@@ -178,10 +178,7 @@ class update_entries_after(object):
|
|||||||
# rounding as per precision
|
# rounding as per precision
|
||||||
self.stock_value = flt(self.stock_value, self.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 = self.stock_value - self.prev_stock_value
|
||||||
stock_value_difference = sle.actual_qty * self.valuation_rate
|
|
||||||
else:
|
|
||||||
stock_value_difference = self.stock_value - self.prev_stock_value
|
|
||||||
|
|
||||||
self.prev_stock_value = self.stock_value
|
self.prev_stock_value = self.stock_value
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user