Merge pull request #29748 from nextchamp-saqib/fix-gp-report-columns

fix: cannot jump to sales invoice in gross profit report
This commit is contained in:
Saqib Ansari 2022-02-11 14:38:40 +05:30 committed by GitHub
commit 2d8e03e059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")) {