fix: bold total in exponential smoothing forecasting (backport #41393) (#41404)

fix: bold total in exponential smoothing forecasting (#41393)

* fix: bold total in exponential smoothing forecasting

* fix: bold total in exponential smoothing forecasting

(cherry picked from commit ba60b5911a)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2024-05-16 15:14:43 +05:30
committed by GitHub
parent a070ad786d
commit 8101b51899
2 changed files with 8 additions and 1 deletions

View File

@@ -93,4 +93,11 @@ frappe.query_reports["Exponential Smoothing Forecasting"] = {
},
},
],
formatter: function (value, row, column, data, default_formatter) {
value = default_formatter(value, row, column, data);
if (column.fieldname === "item_code" && value.includes("Total Quantity")) {
value = "<strong>" + value + "</strong>";
}
return value;
},
};

View File

@@ -144,7 +144,7 @@ class ForecastingReport(ExponentialSmoothingForecast):
if not self.data:
return
total_row = {"item_code": _(frappe.bold("Total Quantity"))}
total_row = {"item_code": _("Total Quantity")}
for value in self.data:
for period in self.period_list: