[Fix] Stock value difference calculation for stock reconciliation
This commit is contained in:
parent
e3136c38e1
commit
16b8ecbe05
@ -180,7 +180,7 @@ class StockReconciliation(StockController):
|
||||
frappe.throw(_("Valuation Rate required for Item in row {0}").format(row.idx))
|
||||
|
||||
if ((previous_sle and row.qty == previous_sle.get("qty_after_transaction")
|
||||
and row.valuation_rate == previous_sle.get("valuation_rate"))
|
||||
and (row.valuation_rate == previous_sle.get("valuation_rate") or row.qty == 0))
|
||||
or (not previous_sle and not row.qty)):
|
||||
continue
|
||||
|
||||
|
@ -176,7 +176,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:
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user