diff --git a/src/views/mobile/transactions/Edit.vue b/src/views/mobile/transactions/Edit.vue index 32a26187..20499b64 100644 --- a/src/views/mobile/transactions/Edit.vue +++ b/src/views/mobile/transactions/Edit.vue @@ -149,10 +149,13 @@ :title="transaction.sourceAccountId | accountName(allAccounts)" @click="showSourceAccountSheet = true" > - - account.category === accountCategory.category); + let totalBalance = 0; + let hasUnCalculatedAmount = false; + + for (let i = 0; i < accountsBalance.length; i++) { + if (accountsBalance[i].currency === this.defaultCurrency) { + totalBalance += accountsBalance[i].balance; + } else { + const balance = this.$exchangeRates.getOtherCurrencyAmount(accountsBalance[i].balance, accountsBalance[i].currency, this.defaultCurrency); + + if (!this.$utilities.isNumber(balance)) { + hasUnCalculatedAmount = true; + continue; + } + + totalBalance += Math.floor(balance); + } + } + + if (hasUnCalculatedAmount) { + totalBalance = totalBalance + '+'; + } + + accountCategory.displayBalance = this.$options.filters.currency(totalBalance, this.defaultCurrency); + } else { + accountCategory.displayBalance = '***'; + } + } + }, getFontSizeByAmount(amount) { if (amount >= 100000000 || amount <= -100000000) { return 32;