From 44c3b1adc51f0cd792332f666d2ba9540064dd2a Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 31 Jul 2014 18:13:24 +0200 Subject: [PATCH] income are negative --- public/app/js/main/controllers/BalanceCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/js/main/controllers/BalanceCtrl.js b/public/app/js/main/controllers/BalanceCtrl.js index ded5f7c3..1a899688 100644 --- a/public/app/js/main/controllers/BalanceCtrl.js +++ b/public/app/js/main/controllers/BalanceCtrl.js @@ -228,7 +228,7 @@ app.controller( 'BalanceCtrl', + '&categories=Income' ) .then( function( response ) { $scope.balance.income = _(response.data).sortBy( function( account ) { - return 1 / account.amount; + return account.amount; } ); $scope.balance.income_total = _(response.data).reduce( function( memo, account ){ return memo + account.amount; }, 0 ); } );