fix the total amount of all sub-accounts under the parent account was not counted after filtering any sub-accounts (#192)

This commit is contained in:
MaysWind
2025-08-10 11:26:27 +08:00
parent 876bf8cc31
commit eadcf7768f
+3 -3
View File
@@ -492,7 +492,7 @@ export const useAccountsStore = defineStore('accounts', () => {
}
const accountsBalance = getAllFilteredAccountsBalance(allCategorizedAccountsMap.value, account =>
!settingsStore.appSettings.totalAmountExcludeAccountIds[account.id]
!(account.type === AccountType.SingleAccount.type && settingsStore.appSettings.totalAmountExcludeAccountIds[account.id])
);
let netAssets = 0;
let hasUnCalculatedAmount = false;
@@ -525,7 +525,7 @@ export const useAccountsStore = defineStore('accounts', () => {
}
const accountsBalance = getAllFilteredAccountsBalance(allCategorizedAccountsMap.value, account =>
!settingsStore.appSettings.totalAmountExcludeAccountIds[account.id] && (account.isAsset || false)
(account.isAsset || false) && !(account.type === AccountType.SingleAccount.type && settingsStore.appSettings.totalAmountExcludeAccountIds[account.id])
);
let totalAssets = 0;
let hasUnCalculatedAmount = false;
@@ -558,7 +558,7 @@ export const useAccountsStore = defineStore('accounts', () => {
}
const accountsBalance = getAllFilteredAccountsBalance(allCategorizedAccountsMap.value, account =>
!settingsStore.appSettings.totalAmountExcludeAccountIds[account.id] && (account.isLiability || false)
(account.isLiability || false) && !(account.type === AccountType.SingleAccount.type && settingsStore.appSettings.totalAmountExcludeAccountIds[account.id])
);
let totalLiabilities = 0;
let hasUnCalculatedAmount = false;