set date range type to custom when switching account and the statement date of two accounts are different
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user