mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 03:04:34 +00:00
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:
@@ -52,9 +52,20 @@ frappe.query_reports["Purchase Order Analysis"] = {
|
|||||||
label: __("Status"),
|
label: __("Status"),
|
||||||
fieldtype: "MultiSelectList",
|
fieldtype: "MultiSelectList",
|
||||||
width: "80",
|
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) {
|
get_data: function (txt) {
|
||||||
|
<<<<<<< HEAD
|
||||||
let status = ["To Bill", "To Receive", "To Receive and Bill", "Completed"];
|
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 = [];
|
let options = [];
|
||||||
for (let option of status) {
|
for (let option of status) {
|
||||||
options.push({
|
options.push({
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ def get_data(filters):
|
|||||||
po.company,
|
po.company,
|
||||||
po_item.name,
|
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)
|
.groupby(po_item.name)
|
||||||
.orderby(po.transaction_date)
|
.orderby(po.transaction_date)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user