fix(report): allow Closed purchase orders to be visible
This commit is contained in:
@@ -52,9 +52,16 @@ frappe.query_reports["Purchase Order Analysis"] = {
|
||||
label: __("Status"),
|
||||
fieldtype: "MultiSelectList",
|
||||
width: "80",
|
||||
options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed"],
|
||||
options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed", "Closed"],
|
||||
get_data: function (txt) {
|
||||
let status = ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed"];
|
||||
let status = [
|
||||
"To Pay",
|
||||
"To Bill",
|
||||
"To Receive",
|
||||
"To Receive and Bill",
|
||||
"Completed",
|
||||
"Closed",
|
||||
];
|
||||
let options = [];
|
||||
for (let option of status) {
|
||||
options.push({
|
||||
|
||||
@@ -70,7 +70,7 @@ def get_data(filters):
|
||||
po.company,
|
||||
po_item.name,
|
||||
)
|
||||
.where((po_item.parent == po.name) & (po.status.notin(("Stopped", "Closed"))) & (po.docstatus == 1))
|
||||
.where((po_item.parent == po.name) & (po.status.notin(("Stopped", "On Hold"))) & (po.docstatus == 1))
|
||||
.groupby(po_item.name)
|
||||
.orderby(po.transaction_date)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user