From 431b4fba7264f3087e9bc6cce1ba40ace96c6c01 Mon Sep 17 00:00:00 2001 From: johnhkelley1 Date: Wed, 5 Sep 2018 00:13:28 -0600 Subject: [PATCH] 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. --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 5e6966437b2..5b6e7066743 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -109,7 +109,7 @@ class StockReconciliation(StockController): self.validation_messages.append(_get_msg(row_num, _("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, self.posting_date, self.posting_time, with_valuation_rate=True)[1] if not row.valuation_rate: