fix(report): allow Closed sales orders to be visible
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user