fix(report): allow Closed sales orders to be visible

This commit is contained in:
Ninad1306
2025-02-25 15:59:46 +05:30
parent 3b2879d3a1
commit 2394e76e7d
2 changed files with 10 additions and 3 deletions

View File

@@ -53,10 +53,17 @@ 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) {
let status = ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed"];
let status = [
"To Pay",
"To Bill",
"To Deliver",
"To Deliver and Bill",
"Completed",
"Closed",
];
let options = [];
for (let option of status) {
options.push({

View File

@@ -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