diff --git a/frontend/src/routes/accounting/account.svelte b/frontend/src/routes/accounting/account.svelte
index 02167396..c71ab133 100644
--- a/frontend/src/routes/accounting/account.svelte
+++ b/frontend/src/routes/accounting/account.svelte
@@ -18,15 +18,16 @@
function calcSums(){
let sums = {};
- sums[0] = 0;
+ sums[ 0] = 0;
+ sums[-1] = 0;
for (let user of Object.values(users)) sums[user.id] = 0;
for (let transaction of filtered) {
for (let user of Object.values(users)){
if (user.id == transaction.destination.id) sums[user.id] += transaction.amount;
if (user.id == transaction.source.id) sums[user.id] -= transaction.amount;
}
- if (!transaction.destination.id) sums[0] += transaction.amount;
- if (!transaction.source.id) sums[0] -= transaction.amount;
+ if (!transaction.destination.id) sums[ 0] += transaction.amount;
+ if (!transaction.source.id) sums[-1] += transaction.amount;
}
return sums;
}
@@ -154,10 +155,14 @@
{/each}
-
+ {t('external gains')}
{sums[0].toFixed(2)} {account.currency}
|
- |
+
+ {t('external expenses')}
+ {sums[-1].toFixed(2)} {account.currency}
+ |
+ |
diff --git a/translations/src/main/resources/de.json b/translations/src/main/resources/de.json
index c4344888..b46ac104 100644
--- a/translations/src/main/resources/de.json
+++ b/translations/src/main/resources/de.json
@@ -126,6 +126,8 @@
"evaluate": "auswerten",
"expand_on_click": "Anklicken zum Anzeigen",
"extended_settings": "erweiterte Einstellungen",
+ "external expenses": "externe Ausgaben",
+ "external gains": "externe Einnahmen",
"failed": "fehlgeschlagen",
"failed_login_attempts" : "Account nach {attempts} fehlgeschlagenen Logins gesperrt bis {release_time}",
diff --git a/translations/src/main/resources/en.json b/translations/src/main/resources/en.json
index 95fbdc60..5d082177 100644
--- a/translations/src/main/resources/en.json
+++ b/translations/src/main/resources/en.json
@@ -126,6 +126,8 @@
"evaluate": "evaluate",
"expand_on_click": "click to expand",
"extended_settings": "extended settings",
+ "external expenses": "external expenses",
+ "external gains": "external gains",
"failed": "failed",
"failed_login_attempts" : "account locked until {release_time} after {attempts} failed login attempts",