From a8da0fecb5b21b6897f5f2b3b04767a7b9c59488 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 17 Nov 2011 14:47:05 +0530 Subject: [PATCH] Account link query changed in LC wizard --- erpnext/patches/reload_lc_wizard.py | 1 + erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/reload_lc_wizard.py b/erpnext/patches/reload_lc_wizard.py index 6c884c9a8c..6b8565eafe 100644 --- a/erpnext/patches/reload_lc_wizard.py +++ b/erpnext/patches/reload_lc_wizard.py @@ -4,5 +4,6 @@ def execute(): from webnotes.model import delete_doc delete_doc('DocType', 'Landed Cost Wizard') + delete_doc('DocType', 'LC PR Detail') reload_doc('stock', 'doctype', 'landed_cost_wizard') reload_doc('stock', 'doctype', 'lc_pr_detail') diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js index 7e68f9b4ae..369fd4d267 100644 --- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js +++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js @@ -4,5 +4,5 @@ if(!doc.currency){doc.currency = sys_defaults.currency;} cur_frm.fields_dict['landed_cost_details'].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") AND tabAccount.name LIKE "%s"' + 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"'; }