mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2024-12-26 09:59:18 +01:00
asc
This commit is contained in:
parent
bdab7264af
commit
a2d4e120a0
1 changed files with 2 additions and 2 deletions
|
@ -217,7 +217,7 @@ app.controller( 'BalanceCtrl',
|
|||
+ '&categories=Expenses' )
|
||||
.then( function( response ) {
|
||||
$scope.balance.expenses = _(response.data).sortBy( function( account ) {
|
||||
return account.amount;
|
||||
return 1 / account.amount;
|
||||
} );
|
||||
$scope.balance.expenses_total = _(response.data).reduce( function( memo, account ){ return memo + account.amount; }, 0 );
|
||||
} );
|
||||
|
@ -228,7 +228,7 @@ app.controller( 'BalanceCtrl',
|
|||
+ '&categories=Income' )
|
||||
.then( function( response ) {
|
||||
$scope.balance.income = _(response.data).sortBy( function( account ) {
|
||||
return account.amount;
|
||||
return 1 / account.amount;
|
||||
} );
|
||||
$scope.balance.income_total = _(response.data).reduce( function( memo, account ){ return memo + account.amount; }, 0 );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue