income are negative

This commit is contained in:
Gwenhael Le Moine 2014-07-31 18:13:24 +02:00
parent a2d4e120a0
commit 44c3b1adc5

View file

@ -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 );
} );