Skip to content
Snippets Groups Projects
Commit 925b2d63 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Sorting positive amounts before negative gives a better

and more fair estimate of the amount of available cash.
parent ec29d4d6
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ class RecurringItemRange < ActiveRecord::Base ...@@ -28,7 +28,7 @@ class RecurringItemRange < ActiveRecord::Base
elsif @next_event != other.next_event elsif @next_event != other.next_event
return @next_event <=> other.next_event return @next_event <=> other.next_event
else else
return amount <=> other.amount return -(amount <=> other.amount)
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment