Improvements average calculation.
This commit is contained in:
parent
a2de4beeab
commit
55f702e42b
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ class Stats::TicketLoadMeasure
|
|||
end
|
||||
|
||||
if total != 0
|
||||
load_measure_precent = ( count.to_f / (total.to_f/100) ).round(1)
|
||||
load_measure_precent = ( count.to_f / (total.to_f/100) ).round(3)
|
||||
end
|
||||
{
|
||||
used_for_average: load_measure_precent,
|
||||
|
@ -57,7 +57,7 @@ class Stats::TicketLoadMeasure
|
|||
end
|
||||
|
||||
# convert result[:used_for_average] in percent to related total
|
||||
result[:average_per_agent] = ( (result[:total].to_f/100) * result[:used_for_average] ).round(1)
|
||||
result[:average_per_agent] = ( (result[:total].to_f/100) * result[:average_per_agent] ).round(1)
|
||||
|
||||
result
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue