fix: renamed view types, added default
This commit is contained in:
parent
d543830a59
commit
b59f2780eb
@ -4,11 +4,12 @@
|
|||||||
frappe.query_reports["Customer Acquisition and Loyalty"] = {
|
frappe.query_reports["Customer Acquisition and Loyalty"] = {
|
||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
"fieldname":"view_type",
|
"fieldname": "view_type",
|
||||||
"label": __("View Type"),
|
"label": __("View Type"),
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"default": "Time Series",
|
"options": ["Monthly", "Territory Wise"],
|
||||||
"options": ["Time Series", "Territory Tree"]
|
"default": "Monthly",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"company",
|
"fieldname":"company",
|
||||||
|
|||||||
@ -52,7 +52,7 @@ def execute(filters=None):
|
|||||||
'width': 150
|
'width': 150
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
if filters.get('view_type') == 'Territory Tree':
|
if filters.get('view_type') == 'Territory Wise':
|
||||||
return get_data_by_territory(filters, common_columns)
|
return get_data_by_territory(filters, common_columns)
|
||||||
else:
|
else:
|
||||||
return get_data_by_time(filters, common_columns)
|
return get_data_by_time(filters, common_columns)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user