Fixed calculation of average state.

This commit is contained in:
Martin Edenhofer 2015-09-08 14:12:14 +02:00
parent 9c4ca4b7d6
commit 93559feecf

View file

@ -65,7 +65,7 @@ class Stats::TicketInProcess
return result
end
in_percent = ( result[:used_for_average].to_f / (result[:total].to_f/100) ).round(1)
in_percent = ( result[:used_for_average].to_f / (result[:average_per_agent].to_f/100) ).round(1)
if in_percent >= 90
result[:state] = 'supergood'
elsif in_percent >= 65