Skip to content

Commit

Permalink
fix: user can select disabled accounts in taxes table
Browse files Browse the repository at this point in the history
(cherry picked from commit a1e3ae8)
  • Loading branch information
nextchamp-saqib authored and mergify[bot] committed May 12, 2022
1 parent 9fbd170 commit 047c879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions erpnext/controllers/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def get_accounts(with_account_type_filter):
{account_type_condition}
AND is_group = 0
AND company = %(company)s
AND disabled = %(disabled)s
AND (account_currency = %(currency)s or ifnull(account_currency, '') = '')
AND `{searchfield}` LIKE %(txt)s
{mcond}
Expand All @@ -175,6 +176,7 @@ def get_accounts(with_account_type_filter):
dict(
account_types=filters.get("account_type"),
company=filters.get("company"),
disabled=filters.get("disabled", 0),
currency=company_currency,
txt="%{}%".format(txt),
offset=start,
Expand Down
3 changes: 2 additions & 1 deletion erpnext/public/js/controllers/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ frappe.ui.form.on(cur_frm.doctype, {
query: "erpnext.controllers.queries.tax_account_query",
filters: {
"account_type": account_type,
"company": doc.company
"company": doc.company,
"disabled": 0
}
}
});
Expand Down

0 comments on commit 047c879

Please sign in to comment.