From 0c883500bb0ade2de2f71153de3aebd707940aa8 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 3 Feb 2015 17:58:46 +0530 Subject: [PATCH] Expense account query in purchase invoice --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 6c7e87f048..c9a4ff090b 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -405,7 +405,7 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters): # Hence the first condition is an "OR" return frappe.db.sql("""select tabAccount.name from `tabAccount` where (tabAccount.report_type = "Profit and Loss" - or tabAccount.account_type = "Expense Account") + or tabAccount.account_type in ("Expense Account", "Fixed Asset")) and tabAccount.group_or_ledger="Ledger" and tabAccount.docstatus!=2 and ifnull(tabAccount.master_type, "")=""