|
|
|
@ -197,11 +197,11 @@ class CostReportsController < ApplicationController |
|
|
|
|
# Determine the active cost type, if it is not labor or money, and add a hidden filter to the query |
|
|
|
|
# sets the @cost_type -> this is used to select the proper units for display |
|
|
|
|
def set_cost_type |
|
|
|
|
if @query |
|
|
|
|
return unless @query |
|
|
|
|
|
|
|
|
|
@query.filter :cost_type_id, operator: '=', value: @unit_id.to_s, display: false |
|
|
|
|
@cost_type = CostType.find(@unit_id) if @unit_id > 0 |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
# set the @cost_types -> this is used to determine which tabs to display |
|
|
|
|
def set_active_cost_types |
|
|
|
|