fix: format filter values in report print view (#20717)
Co-authored-by: Michael Weißer <michael.weisser@rindenmuehle.de>
This commit is contained in:
parent
c1af128aba
commit
af500bb3f5
2 changed files with 4 additions and 5 deletions
|
|
@ -1424,9 +1424,9 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
const applied_filters = this.get_filter_values();
|
||||
return Object.keys(applied_filters)
|
||||
.map((fieldname) => {
|
||||
const label = frappe.query_report.get_filter(fieldname).df.label;
|
||||
const docfield = frappe.query_report.get_filter(fieldname).df;
|
||||
const value = applied_filters[fieldname];
|
||||
return `<h6>${__(label)}: ${value}</h6>`;
|
||||
return `<h6>${__(docfield.label)}: ${frappe.format(value, docfield)}</h6>`;
|
||||
})
|
||||
.join("");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1349,9 +1349,8 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
|
|||
.map((f) => {
|
||||
const [doctype, fieldname, condition, value] = f;
|
||||
if (condition !== "=") return "";
|
||||
|
||||
const label = frappe.meta.get_label(doctype, fieldname);
|
||||
return `<h6>${__(label)}: ${value}</h6>`;
|
||||
const docfield = frappe.meta.get_docfield(doctype, fieldname);
|
||||
return `<h6>${__(docfield.label)}: ${frappe.format(value, docfield)}</h6>`;
|
||||
})
|
||||
.join("");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue