From 6be567dbf64ee4183929d2dab24b952ef63bd0bf Mon Sep 17 00:00:00 2001 From: NandhiniDevi <95607404+Nandhinidevi123@users.noreply.github.com> Date: Tue, 19 Sep 2023 19:25:46 +0530 Subject: [PATCH] fix: add item group filter added in item-wise purchase register (#36937) fix: add item group filter added in item-wise purchase register (#36937) --- .../item_wise_purchase_register.js | 6 ++++++ .../item_wise_purchase_register.py | 1 + 2 files changed, 7 insertions(+) diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js index b709ab9b57..423cd6a845 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js @@ -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"), diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py index 5d3d4d7497..ad196a9032 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py @@ -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]