From 1d702bf112a842fffa740523134ac653ea615b8f Mon Sep 17 00:00:00 2001 From: ShashaQin Date: Mon, 1 Feb 2016 16:51:01 +0800 Subject: [PATCH 1/2] Update stock_reconciliation_item.json Update valuation rate description. This description will be shown on downloaded template in order to input valuation rate correct. --- .../stock_reconciliation_item.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json index ddc7087c9e2..f9d8b3d81e8 100644 --- a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json +++ b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json @@ -110,7 +110,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "description": "", + "description": "Do not include symbols (ex. $)", "fieldname": "valuation_rate", "fieldtype": "Currency", "hidden": 0, @@ -215,7 +215,7 @@ "istable": 1, "max_attachments": 0, "menu_index": 0, - "modified": "2015-11-30 02:34:10.385030", + "modified": "2016-01-27 16:04:42.325454", "modified_by": "Administrator", "module": "Stock", "name": "Stock Reconciliation Item", @@ -226,4 +226,4 @@ "read_only_onload": 0, "sort_field": "modified", "sort_order": "DESC" -} \ No newline at end of file +} From ed11e93b25a679294cf66baa2f62159caa0b6819 Mon Sep 17 00:00:00 2001 From: ShashaQin Date: Mon, 1 Feb 2016 16:54:19 +0800 Subject: [PATCH 2/2] Update stock_reconciliation.py exclude 'disabled' item when get items --- .../stock_reconciliation.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 0d9be9b5d50..1dc55784367 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -252,21 +252,23 @@ def get_items(warehouse, posting_date, posting_time): items = frappe.get_list("Bin", fields=["item_code"], filters={"warehouse": warehouse}, as_list=1) items += frappe.get_list("Item", fields=["name"], filters= {"is_stock_item": 1, "has_serial_no": 0, - "has_batch_no": 0, "has_variants": 0, "default_warehouse": warehouse}, as_list=1) + "has_batch_no": 0, "has_variants": 0, "disabled": 0, "default_warehouse": warehouse}, as_list=1) res = [] for item in set(items): stock_bal = get_stock_balance(item[0], warehouse, posting_date, posting_time, with_valuation_rate=True) - res.append({ - "item_code": item[0], - "warehouse": warehouse, - "qty": stock_bal[0], - "valuation_rate": stock_bal[1], - "current_qty": stock_bal[0], - "current_valuation_rate": stock_bal[1] - }) + if frappe.db.get_value("Item",item[0],"disabled") == 0: + + res.append({ + "item_code": item[0], + "warehouse": warehouse, + "qty": stock_bal[0], + "valuation_rate": stock_bal[1], + "current_qty": stock_bal[0], + "current_valuation_rate": stock_bal[1] + }) return res