fix: Status in Report and filter query
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js
index ad390c4..518d665 100644
--- a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js
@@ -65,7 +65,7 @@
fieldname: "supplier_quotation",
default: "",
get_data: function(txt) {
- return frappe.db.get_link_options('Supplier Quotation', txt);
+ return frappe.db.get_link_options('Supplier Quotation', txt, {'docstatus': ["<", 2]});
}
},
{
@@ -110,19 +110,6 @@
reporter.make_default_supplier_dialog(report);
}, 'Tools');
- const status_message = `
- <span class="indicator">
- Valid till :
- </span>
- <span class="indicator orange">
- Expires in a week or less
- </span>
-
- <span class="indicator red">
- Expires today / Already Expired
- </span>`;
- report.$status.html(status_message).show();
-
},
make_default_supplier_dialog: (report) => {
// Get the name of the item to change
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
index ffa138f..4426560 100644
--- a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
@@ -17,8 +17,9 @@
columns = get_columns()
data, chart_data = prepare_data(supplier_quotation_data, filters)
+ message = get_message()
- return columns, data, None, chart_data
+ return columns, data, message, chart_data
def get_conditions(filters):
conditions = ""
@@ -207,4 +208,16 @@
}
]
- return columns
\ No newline at end of file
+ return columns
+
+def get_message():
+ return """<span class="indicator">
+ Valid till :
+ </span>
+ <span class="indicator orange">
+ Expires in a week or less
+ </span>
+
+ <span class="indicator red">
+ Expires today / Already Expired
+ </span>"""
\ No newline at end of file