refactor: ignore disabled account while selecting Income Accounts

This commit is contained in:
ruthra kumar
2023-11-02 17:19:06 +05:30
parent 6210b24c64
commit 6e3e094c95
2 changed files with 12 additions and 10 deletions

View File

@@ -611,6 +611,8 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
if filters.get("company"):
condition += "and tabAccount.company = %(company)s"
condition += f"and tabAccount.disabled = {filters.get('disabled', 0)}"
return frappe.db.sql(
"""select tabAccount.name from `tabAccount`
where (tabAccount.report_type = "Profit and Loss"