when doing a cost report with the parameter default=1 the default query

will be calculated

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1388 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
p.tessenow 15 years ago
parent 41c35bca1e
commit 68f29d2502
  1. 8
      app/controllers/cost_reports_controller.rb

@ -69,12 +69,16 @@ class CostReportsController < ApplicationController
end
end
def force_default?
params[:default].to_i == 1
end
##
# Build the query from the current request and save it to
# the session.
def query
filters = filter_params
groups = group_params
filters = force_default? ? default_filter_parameters : filter_params
groups = force_default? ? default_group_parameters : group_params
session[:cost_query] = {:filters => filters, :groups => groups}

Loading…
Cancel
Save