total income and expense amount of month uses the currency of account when filter by account

This commit is contained in:
MaysWind
2021-01-15 01:21:46 +08:00
parent 3b0f6454a3
commit 7c8f562543
+8
View File
@@ -385,6 +385,14 @@ export default {
}, },
computed: { computed: {
defaultCurrency() { defaultCurrency() {
if (this.query.accountId && this.query.accountId !== '0') {
const account = this.allAccounts[this.query.accountId];
if (account && account.currency && account.currency !== this.$constants.currency.parentAccountCurrencyPlaceholder) {
return account.currency;
}
}
return this.$store.getters.currentUserDefaultCurrency || this.$t('default.currency'); return this.$store.getters.currentUserDefaultCurrency || this.$t('default.currency');
}, },
query() { query() {