diff --git a/frontend/components/accountOverview.vue b/frontend/components/accountOverview.vue index 294f555..581fbfc 100644 --- a/frontend/components/accountOverview.vue +++ b/frontend/components/accountOverview.vue @@ -2,13 +2,29 @@
-
+
-
- {{ accountIdToName[accountId] }} +
+ {{ accountIdToName[accountId] }} +
+
+ {{ formatNumber(account.balance - balanceUncleared) }} € + Cleared Balance +
+ + +
+ {{ formatNumber(balanceUncleared) }} € + Uncleared Balance +
+ = +
+ {{ formatNumber(account.balance) }} € + Working Balance +
+
@@ -301,6 +317,12 @@ export default { return Object.fromEntries(this.accounts.map(acc => [acc.id, acc.type])) }, + balanceUncleared() { + return this.transactions + .filter(tx => !tx.cleared) + .reduce((sum, tx) => sum + tx.amount, 0) + }, + categories() { const cats = this.accounts.filter(acc => acc.type === 'category') cats.sort((a, b) => a.name.localeCompare(b.name))