mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 17:15:04 +00:00
feat: parent item group support in Stock Projected Qty report
(cherry picked from commit 6e80d89d13)
This commit is contained in:
committed by
Mergify
parent
142de2e2a7
commit
db525c2538
@@ -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