Order Budget headings by id when calculating heading stats

This commit is contained in:
Bertocq
2017-06-30 23:42:30 +02:00
committed by Javi Martín
parent 9f6f7496c1
commit cdece48898

View File

@@ -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