Removed debit_or_credit field

This commit is contained in:
Nabin Hait
2014-03-03 18:40:24 +05:30
parent 133490a0c5
commit 49a6f0754e
33 changed files with 194 additions and 263 deletions

View File

@@ -106,18 +106,16 @@ def supplier_query(doctype, txt, searchfield, start, page_len, filters):
'page_len': page_len})
def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select name, parent_account, debit_or_credit
from tabAccount
return frappe.db.sql("""select name, parent_account from tabAccount
where tabAccount.docstatus!=2
and (account_type in (%s) or
(ifnull(is_pl_account, 'No') = 'Yes' and debit_or_credit = %s) )
and (account_type in (%s) or root_type = %s)
and group_or_ledger = 'Ledger'
and company = %s
and `%s` LIKE %s
limit %s, %s""" %
(", ".join(['%s']*len(filters.get("account_type"))),
"%s", "%s", searchfield, "%s", "%s", "%s"),
tuple(filters.get("account_type") + [filters.get("debit_or_credit"),
tuple(filters.get("account_type") + [filters.get("root_type"),
filters.get("company"), "%%%s%%" % txt, start, page_len]))
def item_query(doctype, txt, searchfield, start, page_len, filters):