diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js index 5866fcbc845..3343c416749 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js @@ -53,10 +53,21 @@ frappe.query_reports["Sales Order Analysis"] = { fieldname: "status", label: __("Status"), fieldtype: "MultiSelectList", - options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed"], + options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed", "Closed"], width: "80", get_data: function (txt) { +<<<<<<< HEAD let status = ["To Bill", "To Deliver", "To Deliver and Bill", "Completed"]; +======= + let status = [ + "To Pay", + "To Bill", + "To Deliver", + "To Deliver and Bill", + "Completed", + "Closed", + ]; +>>>>>>> 2394e76e7d (fix(report): allow `Closed` sales orders to be visible) let options = []; for (let option of status) { options.push({ diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py index 8fcf29bd7a6..90c33c323ce 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py @@ -86,7 +86,7 @@ def get_data(conditions, filters): ON sii.so_detail = soi.name and sii.docstatus = 1 WHERE soi.parent = so.name - and so.status not in ('Stopped', 'Closed', 'On Hold') + and so.status not in ('Stopped', 'On Hold') and so.docstatus = 1 {conditions} GROUP BY soi.name