diff --git a/app/controllers/cost_reports_controller.rb b/app/controllers/cost_reports_controller.rb index 80c0d8558f..582b5f6416 100644 --- a/app/controllers/cost_reports_controller.rb +++ b/app/controllers/cost_reports_controller.rb @@ -242,6 +242,11 @@ private :limit => limit, :offset => @entry_pages.current.offset} return + elsif !@query.display_time_entries && !@query.display_time_entries + @entry_sum, @entry_count = [0 , 0] + @entry_pages = Paginator.new self, @entry_count, limit, params['page'] + @entries = [] + return end @entry_count = time_entry_count + cost_entry_count diff --git a/app/views/cost_reports/_list_group_by.rhtml b/app/views/cost_reports/_list_group_by.rhtml index 345fa101b6..bd9ff6ce75 100644 --- a/app/views/cost_reports/_list_group_by.rhtml +++ b/app/views/cost_reports/_list_group_by.rhtml @@ -2,10 +2,10 @@ def display_js(invert=false) group_by_column = CostQuery.group_by_columns[@query.group_by[:name]] - return "Form.serialize('filter-options')" unless group_by_column[:scope] == :costs + return "'' + Form.serialize('filter-options')" unless group_by_column[:scope] == :costs - display_costs = (CostEntry.column_names.include? group_by_column[:db_field].to_s && @query.display_cost_entries) - display_time = (TimeEntry.column_names.include? group_by_column[:db_field].to_s && @query.display_time_entries) + display_costs = ((CostEntry.column_names.include? group_by_column[:db_field].to_s) && @query.display_cost_entries) + display_time = ((TimeEntry.column_names.include? group_by_column[:db_field].to_s) && @query.display_time_entries) if invert display_costs = !display_costs