diff --git a/app/models/budget/stats.rb b/app/models/budget/stats.rb index de07b7040..338b28fd1 100644 --- a/app/models/budget/stats.rb +++ b/app/models/budget/stats.rb @@ -129,7 +129,7 @@ class Budget def headings stats_cache("headings") do groups = Hash.new(0) - @budget.headings.each do |heading| + @budget.headings.order("id ASC").each do |heading| groups[heading.id] = Hash.new(0).merge(calculate_heading_totals(heading)) end