|
|
|
@ -197,10 +197,10 @@ 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 |
|
|
|
|
@query.filter :cost_type_id, operator: '=', value: @unit_id.to_s, display: false |
|
|
|
|
@cost_type = CostType.find(@unit_id) if @unit_id > 0 |
|
|
|
|
end |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
# set the @cost_types -> this is used to determine which tabs to display |
|
|
|
|