diff --git a/src/accounts/accounts.html b/src/accounts/accounts.html
index 5455b6a..017aaca 100644
--- a/src/accounts/accounts.html
+++ b/src/accounts/accounts.html
@@ -39,20 +39,21 @@
+ ng-repeat="account in accountsCtrl.accounts | orderBy:'name'"
+ ng-init="account.getBalances()">
{{ account.name }}
|
-
- {{ account.solds.current | currency : "€" }}
+
+ {{ account.balances.current | currency : "€" }}
|
-
- {{ account.solds.pointed | currency : "€" }}
+
+ {{ account.balances.pointed | currency : "€" }}
|
diff --git a/src/accounts/index.js b/src/accounts/index.js
index 888cd7a..cea1456 100644
--- a/src/accounts/index.js
+++ b/src/accounts/index.js
@@ -47,10 +47,10 @@ var accountModule = angular.module('accountant.accounts', [
}
);
- Account.prototype.getSolds = function() {
- var Solds = $resource('/api/account/:id/balances', {id: this.id});
+ Account.prototype.getBalances = function() {
+ var Balances = $resource('/api/account/:id/balances', {id: this.id});
- this.solds = Solds.get();
+ this.balances = Balances.get();
};
Account.prototype.getBalance = function(begin, end) {