feat(gp): group by cost center

(cherry picked from commit e26bc17c75)
This commit is contained in:
Dany Robert
2024-06-03 13:55:12 +00:00
committed by Mergify
parent fe9dffb271
commit 068ae87b8d
2 changed files with 16 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ frappe.query_reports["Gross Profit"] = {
label: __("Group By"),
fieldtype: "Select",
options:
"Invoice\nItem Code\nItem Group\nBrand\nWarehouse\nCustomer\nCustomer Group\nTerritory\nSales Person\nProject\nMonthly\nPayment Term",
"Invoice\nItem Code\nItem Group\nBrand\nWarehouse\nCustomer\nCustomer Group\nTerritory\nSales Person\nProject\nCost Center\nMonthly\nPayment Term",
default: "Invoice",
},
{

View File

@@ -125,6 +125,13 @@ def execute(filters=None):
"gross_profit_percent",
],
"project": ["project", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
"cost_center": [
"cost_center",
"base_amount",
"buying_amount",
"gross_profit",
"gross_profit_percent",
],
"territory": [
"territory",
"base_amount",
@@ -304,7 +311,14 @@ def get_columns(group_wise_columns, filters):
"fieldname": "project",
"fieldtype": "Link",
"options": "Project",
"width": 100,
"width": 140,
},
"cost_center": {
"label": _("Cost Center"),
"fieldname": "cost_center",
"fieldtype": "Link",
"options": "Cost Center",
"width": 140,
},
"sales_person": {
"label": _("Sales Person"),