mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
fix: Status in Report and filter query
This commit is contained in:
@@ -65,7 +65,7 @@ frappe.query_reports["Quoted Item Comparison"] = {
|
|||||||
fieldname: "supplier_quotation",
|
fieldname: "supplier_quotation",
|
||||||
default: "",
|
default: "",
|
||||||
get_data: function(txt) {
|
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 @@ frappe.query_reports["Quoted Item Comparison"] = {
|
|||||||
reporter.make_default_supplier_dialog(report);
|
reporter.make_default_supplier_dialog(report);
|
||||||
}, 'Tools');
|
}, '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) => {
|
make_default_supplier_dialog: (report) => {
|
||||||
// Get the name of the item to change
|
// Get the name of the item to change
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ def execute(filters=None):
|
|||||||
columns = get_columns()
|
columns = get_columns()
|
||||||
|
|
||||||
data, chart_data = prepare_data(supplier_quotation_data, filters)
|
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):
|
def get_conditions(filters):
|
||||||
conditions = ""
|
conditions = ""
|
||||||
@@ -208,3 +209,15 @@ def get_columns():
|
|||||||
]
|
]
|
||||||
|
|
||||||
return columns
|
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>"""
|
||||||
Reference in New Issue
Block a user