fix: user can select disabled accounts in taxes table
This commit is contained in:
parent
b0f302e579
commit
a1e3ae8869
@ -162,6 +162,7 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
{account_type_condition}
|
{account_type_condition}
|
||||||
AND is_group = 0
|
AND is_group = 0
|
||||||
AND company = %(company)s
|
AND company = %(company)s
|
||||||
|
AND disabled = %(disabled)s
|
||||||
AND (account_currency = %(currency)s or ifnull(account_currency, '') = '')
|
AND (account_currency = %(currency)s or ifnull(account_currency, '') = '')
|
||||||
AND `{searchfield}` LIKE %(txt)s
|
AND `{searchfield}` LIKE %(txt)s
|
||||||
{mcond}
|
{mcond}
|
||||||
@ -175,6 +176,7 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
dict(
|
dict(
|
||||||
account_types=filters.get("account_type"),
|
account_types=filters.get("account_type"),
|
||||||
company=filters.get("company"),
|
company=filters.get("company"),
|
||||||
|
disabled=filters.get("disabled", 0),
|
||||||
currency=company_currency,
|
currency=company_currency,
|
||||||
txt="%{}%".format(txt),
|
txt="%{}%".format(txt),
|
||||||
offset=start,
|
offset=start,
|
||||||
|
|||||||
@ -27,7 +27,8 @@ frappe.ui.form.on(cur_frm.doctype, {
|
|||||||
query: "erpnext.controllers.queries.tax_account_query",
|
query: "erpnext.controllers.queries.tax_account_query",
|
||||||
filters: {
|
filters: {
|
||||||
"account_type": account_type,
|
"account_type": account_type,
|
||||||
"company": doc.company
|
"company": doc.company,
|
||||||
|
"disabled": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user