set date range type to custom when switching account and the statement date of two accounts are different

This commit is contained in:
MaysWind
2024-12-21 22:30:59 +08:00
parent 90b608bdc6
commit 7659e8f0f7
+4 -3
View File
@@ -775,12 +775,13 @@ export const useTransactionsStore = defineStore('transactions', {
}
if (filter && isString(filter.accountIds) && this.transactionsFilter.accountIds !== filter.accountIds) {
this.transactionsFilter.accountIds = filter.accountIds;
if (datetimeConstants.allBillingCycleDateRangesMap[this.transactionsFilter.dateType] && !accountsStore.getAccountStatementDate(this.transactionsFilter.accountIds)) {
if (datetimeConstants.allBillingCycleDateRangesMap[this.transactionsFilter.dateType] &&
(!accountsStore.getAccountStatementDate(filter.accountIds) || accountsStore.getAccountStatementDate(filter.accountIds) !== accountsStore.getAccountStatementDate(this.transactionsFilter.accountIds))) {
this.transactionsFilter.dateType = datetimeConstants.allDateRanges.Custom.type;
}
this.transactionsFilter.accountIds = filter.accountIds;
changed = true;
}