Allow for 0 valuation rate in Stock Reconciliation (#15313)
Currently, a valuation rate of 0 gets treated the same as an omitted valuation rate, and gets overwritten during validation. This hotfix allows a Stock Reconciliation Item's valuation rate to be set to 0.
This commit is contained in:
parent
fba985d49d
commit
431b4fba72
@ -109,7 +109,7 @@ class StockReconciliation(StockController):
|
|||||||
self.validation_messages.append(_get_msg(row_num,
|
self.validation_messages.append(_get_msg(row_num,
|
||||||
_("Negative Valuation Rate is not allowed")))
|
_("Negative Valuation Rate is not allowed")))
|
||||||
|
|
||||||
if row.qty and not row.valuation_rate:
|
if row.qty and row.valuation_rate in ["", None]:
|
||||||
row.valuation_rate = get_stock_balance(row.item_code, row.warehouse,
|
row.valuation_rate = get_stock_balance(row.item_code, row.warehouse,
|
||||||
self.posting_date, self.posting_time, with_valuation_rate=True)[1]
|
self.posting_date, self.posting_time, with_valuation_rate=True)[1]
|
||||||
if not row.valuation_rate:
|
if not row.valuation_rate:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user