Skip to content

Commit

Permalink
fix: cannot jump to sales invoice in gross profit report
Browse files Browse the repository at this point in the history
(cherry picked from commit 78dd364)
  • Loading branch information
nextchamp-saqib authored and mergify-bot committed Feb 11, 2022
1 parent 5a771dc commit 7c5480d
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

1 comment on commit 7c5480d

@Citysystems-smart
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after updating to v13.36.2 from v13.16.1, I get this change but it does not work correctly what this change is doing is changing all the links to item
so Item group, customer, warehouse, and anything else than the sales invoice will link it to the item, and that wrong

I think the else statement was wrong

Please sign in to comment.