From 925b2d6342ff78c142fd2e8fdfd95b7c85c07bb7 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Fri, 1 Sep 2006 14:34:02 +0000
Subject: [PATCH] Sorting positive amounts before negative gives a better and
 more fair estimate of the amount of available cash.

---
 app/models/recurring_item_range.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/models/recurring_item_range.rb b/app/models/recurring_item_range.rb
index 7119853..0d6016d 100644
--- a/app/models/recurring_item_range.rb
+++ b/app/models/recurring_item_range.rb
@@ -28,7 +28,7 @@ class RecurringItemRange < ActiveRecord::Base
     elsif @next_event != other.next_event
       return @next_event <=> other.next_event
     else
-      return amount <=> other.amount
+      return -(amount <=> other.amount)
     end
   end
 
-- 
GitLab