From d7fb6dce89900b928f2cae85a6755ab403b1ee3b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 31 Jan 2014 17:05:09 +0530 Subject: [PATCH] Stock reconciliation: cost center filters --- .../doctype/stock_reconciliation/stock_reconciliation.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js index 48f3e45863..b12b38a361 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js @@ -40,6 +40,14 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ } } } + this.frm.fields_dict["cost_center"].get_query = function() { + return { + "filters": { + 'company': me.frm.doc.company, + 'group_or_ledger': 'Ledger' + } + } + } } },