fix: Delayed Order Report not working (#41037)
(cherry picked from commit d69a18b826)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -86,7 +86,11 @@ class DelayedItemReport:
|
||||
filters = {"parent": ("in", sales_orders), "name": ("in", sales_order_items)}
|
||||
|
||||
so_data = {}
|
||||
for d in frappe.get_all(doctype, filters=filters, fields=["delivery_date", "parent", "name"]):
|
||||
fields = ["delivery_date", "name"]
|
||||
if frappe.db.has_column(doctype, "parent"):
|
||||
fields.append("parent")
|
||||
|
||||
for d in frappe.get_all(doctype, filters=filters, fields=fields):
|
||||
key = d.name if consolidated else (d.parent, d.name)
|
||||
if key not in so_data:
|
||||
so_data.setdefault(key, d.delivery_date)
|
||||
|
||||
Reference in New Issue
Block a user