Merge pull request #17920 from Anurag810/stock_balance_report
fix: fetch item on the base of item group
This commit is contained in:
commit
0d7d4879a9
@ -152,6 +152,9 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=False):
|
||||
conditions = []
|
||||
|
||||
if not filters["item_group"]:
|
||||
filters.pop("item_group", None)
|
||||
|
||||
description_cond = ''
|
||||
if frappe.db.count('Item', cache=True) < 50000:
|
||||
# scan description only if items are less than 50000
|
||||
|
@ -40,7 +40,10 @@ frappe.query_reports["Stock Balance"] = {
|
||||
"options": "Item",
|
||||
"get_query": function() {
|
||||
return {
|
||||
query: "erpnext.controllers.queries.item_query"
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters: {
|
||||
"item_group": frappe.query_report.get_filter_value("item_group")
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user