Skip to content

Commit

Permalink
Merge pull request #29751 from frappe/mergify/bp/version-13-hotfix/pr…
Browse files Browse the repository at this point in the history
…-29748

fix: cannot jump to sales invoice in gross profit report (backport #29748)
  • Loading branch information
nextchamp-saqib authored Feb 11, 2022
2 parents 5a771dc + 7c5480d commit 7629d47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions erpnext/accounts/report/gross_profit/gross_profit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down

0 comments on commit 7629d47

Please sign in to comment.