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

(cherry picked from commit 3b2879d3a1)

# Conflicts:
#	erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js
This commit is contained in:
Ninad1306
2025-02-24 12:42:05 +05:30
committed by Mergify
parent 0ae2d61974
commit 20c4487853
2 changed files with 13 additions and 2 deletions

View File

@@ -52,9 +52,20 @@ 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) {
<<<<<<< HEAD
let status = ["To Bill", "To Receive", "To Receive and Bill", "Completed"];
=======
let status = [
"To Pay",
"To Bill",
"To Receive",
"To Receive and Bill",
"Completed",
"Closed",
];
>>>>>>> 3b2879d3a1 (fix(report): allow `Closed` purchase orders to be visible)
let options = [];
for (let option of status) {
options.push({

View File

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