mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-25 15:49:31 +00:00
fix: formatted string for disabled filter in get_income_account
(cherry picked from commit 6320f7290f)
This commit is contained in:
@@ -560,7 +560,7 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
if filters.get("company"):
|
if filters.get("company"):
|
||||||
condition += "and tabAccount.company = %(company)s"
|
condition += "and tabAccount.company = %(company)s"
|
||||||
|
|
||||||
condition += f"and tabAccount.disabled = {filters.get('disabled', 0)}"
|
condition += " and tabAccount.disabled = %(disabled)s"
|
||||||
|
|
||||||
return frappe.db.sql(
|
return frappe.db.sql(
|
||||||
f"""select tabAccount.name from `tabAccount`
|
f"""select tabAccount.name from `tabAccount`
|
||||||
@@ -570,7 +570,11 @@ def get_income_account(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
and tabAccount.`{searchfield}` LIKE %(txt)s
|
and tabAccount.`{searchfield}` LIKE %(txt)s
|
||||||
{condition} {get_match_cond(doctype)}
|
{condition} {get_match_cond(doctype)}
|
||||||
order by idx desc, name""",
|
order by idx desc, name""",
|
||||||
{"txt": "%" + txt + "%", "company": filters.get("company", "")},
|
{
|
||||||
|
"txt": "%" + txt + "%",
|
||||||
|
"company": filters.get("company", ""),
|
||||||
|
"disabled": cint(filters.get("disabled", 0)),
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user