Commit d7e36b4d authored by Frank Bergmann's avatar Frank Bergmann

- Added "last 4 years" option to Top Customers

parent 78d7b656
......@@ -22,6 +22,7 @@ Ext.onReady(function () {
fields: ['display', 'value'],
data : [
{"display":"<%=[lang::message::lookup "" intranet-reporting-dashboard.All_Time "All time"]%>", "value":"all_time"},
{"display":"<%=[lang::message::lookup "" intranet-reporting-dashboard.Last_Four_Years "Last Four Years"]%>", "value":"last_four_years"},
{"display":"<%=[lang::message::lookup "" intranet-reporting-dashboard.Last_Year "Last Year"]%>", "value":"last_year"},
{"display":"<%=[lang::message::lookup "" intranet-reporting-dashboard.Last_Quarter "Last Quarter"]%>", "value":"last_quarter"}
]
......
......@@ -34,6 +34,7 @@ set default_currency [im_parameter -package_id [im_package_cost_id] "DefaultCurr
switch $diagram_interval {
last_year { set top_customer_interval_sql "and c.effective_date >= now()::date - 365" }
last_four_years { set top_customer_interval_sql "and c.effective_date >= now()::date - 365 * 4" }
last_quarter { set top_customer_interval_sql "and c.effective_date >= now()::date - 90" }
last_month { set top_customer_interval_sql "and c.effective_date >= now()::date - 30" }
all_time { set top_customer_interval_sql "" }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment