Merge pull request #52637 from frappe/mergify/bp/version-15-hotfix/pr-52619

feat: show formatted currency symbol on ledger preview (backport #52619)
This commit is contained in:
ruthra kumar
2026-02-12 11:46:37 +05:30
committed by GitHub
2 changed files with 9 additions and 1 deletions

View File

@@ -1591,7 +1591,7 @@ def get_gl_entries_for_preview(doctype, docname, fields):
def get_columns(raw_columns, fields):
return [
{"name": d.get("label"), "editable": False, "width": 110}
{"name": d.get("label"), "editable": False, "width": 110, "fieldtype": d.get("fieldtype")}
for d in raw_columns
if not d.get("hidden") and d.get("fieldname") in fields
]

View File

@@ -80,6 +80,14 @@ erpnext.accounts.ledger_preview = {
},
get_datatable(columns, data, wrapper) {
columns.forEach((col) => {
if (col.fieldtype === "Currency") {
col.format = (value) => {
return format_currency(value);
};
}
});
const datatable_options = {
columns: columns,
data: data,