From 7c5480d729ec9ca9e1f4fafabc0774c14fd29b69 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Fri, 11 Feb 2022 12:32:45 +0530 Subject: [PATCH] fix: cannot jump to sales invoice in gross profit report (cherry picked from commit 78dd364b0be9913208d61c402a6c858eb578e210) --- erpnext/accounts/report/gross_profit/gross_profit.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.js b/erpnext/accounts/report/gross_profit/gross_profit.js index 685f2d6176b3..2ba649da07fd 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.js +++ b/erpnext/accounts/report/gross_profit/gross_profit.js @@ -42,6 +42,11 @@ frappe.query_reports["Gross Profit"] = { "parent_field": "parent_invoice", "initial_depth": 3, "formatter": function(value, row, column, data, default_formatter) { + if (column.fieldname == "sales_invoice" && column.options == "Item" && data.indent == 0) { + column._options = "Sales Invoice"; + } else { + column._options = "Item"; + } value = default_formatter(value, row, column, data); if (data && (data.indent == 0.0 || row[1].content == "Total")) {