From bc1d74dbfef1f7310147399a3831cb9dab6153ff Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 4 May 2012 13:13:44 +0530 Subject: [PATCH] fix in landed cost master query --- .../stock/doctype/landed_cost_master/landed_cost_master.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js b/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js index 3cad9447a9..03e8a39fd0 100644 --- a/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js +++ b/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js @@ -23,4 +23,8 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { cur_frm.cscript.refresh = function(doc, cdt, cdn) { +} + +cur_frm.fields_dict.landed_cost.grid.get_field('account_head').get_query = function(doc, cdt, cdn) { + return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND (tabAccount.account_type = "Tax" OR tabAccount.account_type = "Chargeable" or (tabAccount.is_pl_account = "Yes" and tabAccount.debit_or_credit = "Debit")) AND tabAccount.name LIKE "%s"'; } \ No newline at end of file