fix: add item group filter added in item-wise purchase register (#36937)

fix: add item group filter added in item-wise purchase register (#36937)
This commit is contained in:
NandhiniDevi 2023-09-19 19:25:46 +05:30 committed by GitHub
parent 141ba255e0
commit 6be567dbf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,12 @@ frappe.query_reports["Item-wise Purchase Register"] = {
"fieldtype": "Link",
"options": "Item",
},
{
"fieldname": "item_group",
"label": __("Item Group"),
"fieldtype": "Link",
"options": "Item Group",
},
{
"fieldname":"supplier",
"label": __("Supplier"),

View File

@ -293,6 +293,7 @@ def get_conditions(filters):
("from_date", " and `tabPurchase Invoice`.posting_date>=%(from_date)s"),
("to_date", " and `tabPurchase Invoice`.posting_date<=%(to_date)s"),
("mode_of_payment", " and ifnull(mode_of_payment, '') = %(mode_of_payment)s"),
("item_group", " and ifnull(`tabPurchase Invoice Item`.item_group, '') = %(item_group)s"),
):
if filters.get(opts[0]):
conditions += opts[1]