fix: Display totals row in bold

This commit is contained in:
GangaManoj 2021-11-16 03:22:04 +05:30
parent c7ffe3a7b4
commit 508a2301ee
2 changed files with 3 additions and 2 deletions

View File

@ -44,7 +44,7 @@ frappe.query_reports["Gross Profit"] = {
"formatter": function(value, row, column, data, default_formatter) {
value = default_formatter(value, row, column, data);
if (data && data.indent == 0.0) {
if (data && (data.indent == 0.0 || row[1].content == "Total")) {
value = $(`<span>${value}</span>`);
var $value = $(value).css("font-weight", "bold");
value = $value.wrap("<p></p>").parent().html();

View File

@ -77,7 +77,8 @@ def get_data_when_not_grouped_by_invoice(gross_profit_data, filters, group_wise_
row.append(filters.currency)
if idx == len(gross_profit_data.grouped_data)-1:
row[0] = frappe.bold("Total")
row[0] = "Total"
data.append(row)
def get_columns(group_wise_columns, filters):