From 69f350a4d0df9d3c9e35cdc82ca45cabbcacce7e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 6 Aug 2013 15:59:25 +0530 Subject: [PATCH] [perpetual accounting] get_query for account in warehouse --- stock/doctype/warehouse/warehouse.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/stock/doctype/warehouse/warehouse.js b/stock/doctype/warehouse/warehouse.js index 902f66f895..8d768dbbf1 100644 --- a/stock/doctype/warehouse/warehouse.js +++ b/stock/doctype/warehouse/warehouse.js @@ -28,4 +28,15 @@ cur_frm.cscript.merge = function(doc, cdt, cdn) { if (check) { return $c_obj(make_doclist(cdt, cdn), 'merge_warehouses', '', ''); } -} \ No newline at end of file +} + +cur_frm.set_query("account", function() { + return { + filters: { + "company": cur_frm.doc.company, + "debit_or_credit": "Debit", + "is_pl_account": "No", + 'group_or_ledger': "Ledger" + } + } +}) \ No newline at end of file