[Minor] Remove Warehouse column while user groups by 'Item code' in Gross profit report
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index 6f6734e..7185acd 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -9,7 +9,7 @@
def execute(filters=None):
if not filters: filters = frappe._dict()
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
-
+
gross_profit_data = GrossProfitGenerator(filters)
data = []
@@ -19,7 +19,7 @@
"invoice": ["parent", "customer", "posting_date","item_code", "item_name","item_group", "brand", "description", \
"warehouse", "qty", "base_rate", "buying_rate", "base_amount",
"buying_amount", "gross_profit", "gross_profit_percent", "project_name"],
- "item_code": ["item_code", "item_name", "brand", "description", "warehouse", "qty", "base_rate",
+ "item_code": ["item_code", "item_name", "brand", "description", "qty", "base_rate",
"buying_rate", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
"warehouse": ["warehouse", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
"gross_profit", "gross_profit_percent"],
@@ -45,7 +45,7 @@
row = []
for col in group_wise_columns.get(scrub(filters.group_by)):
row.append(src.get(col))
-
+
row.append(company_currency)
data.append(row)
@@ -80,7 +80,7 @@
for col in group_wise_columns.get(scrub(filters.group_by)):
columns.append(column_map.get(col))
-
+
columns.append({
"fieldname": "currency",
"label" : _("Currency"),