From 467f54162f7532459ea4937dcb1f0250e1a97616 Mon Sep 17 00:00:00 2001 From: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com> Date: Tue, 8 Sep 2026 14:43:42 +0530 Subject: [PATCH] fix(gross-profit): include item_name in export (#58631) --- erpnext/accounts/report/gross_profit/gross_profit.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index da6bed73ec4..087eaa5bef1 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -180,13 +180,15 @@ def get_data_when_grouped_by_invoice(columns, gross_profit_data, filters, group_ columns[0]["fieldname"] = "sales_invoice" columns[0]["options"] = "Item" columns[0]["width"] = 300 - # removing Item Code and Item Name columns + # removing the duplicate Item Code column and moving Item Name before Customer supplier_master_name = frappe.db.get_single_value("Buying Settings", "supp_master_name") customer_master_name = frappe.db.get_single_value("Selling Settings", "cust_master_name") if supplier_master_name == "Supplier Name" and customer_master_name == "Customer Name": - del columns[4:6] + del columns[4] + columns.insert(1, columns.pop(4)) else: - del columns[5:7] + del columns[5] + columns.insert(1, columns.pop(5)) total_base_amount = 0 total_buying_amount = 0