mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-06 20:13:15 +00:00
Merge pull request #48492 from frappe/mergify/bp/version-15-hotfix/pr-48488
feat: parent item group support in Stock Projected Qty report (backport #48488)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import flt, today
|
||||
from frappe.utils.nestedset import get_descendants_of
|
||||
from pypika.terms import ExistsCriterion
|
||||
|
||||
from erpnext.accounts.doctype.pos_invoice.pos_invoice import get_pos_reserved_qty
|
||||
@@ -21,6 +22,10 @@ def execute(filters=None):
|
||||
columns = get_columns()
|
||||
bin_list = get_bin_list(filters)
|
||||
item_map = get_item_map(filters.get("item_code"), include_uom)
|
||||
item_groups = []
|
||||
if filters.get("item_group"):
|
||||
item_groups.append(filters.item_group)
|
||||
item_groups.extend(get_descendants_of("Item Group", filters.item_group))
|
||||
|
||||
warehouse_company = {}
|
||||
data = []
|
||||
@@ -40,7 +45,7 @@ def execute(filters=None):
|
||||
if filters.brand and filters.brand != item.brand:
|
||||
continue
|
||||
|
||||
elif filters.item_group and filters.item_group != item.item_group:
|
||||
elif item_groups and item.item_group not in item_groups:
|
||||
continue
|
||||
|
||||
elif filters.company and filters.company != company:
|
||||
|
||||
Reference in New Issue
Block a user