mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
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) {
|
if (filter && isString(filter.accountIds) && this.transactionsFilter.accountIds !== filter.accountIds) {
|
||||||
this.transactionsFilter.accountIds = filter.accountIds;
|
if (datetimeConstants.allBillingCycleDateRangesMap[this.transactionsFilter.dateType] &&
|
||||||
|
(!accountsStore.getAccountStatementDate(filter.accountIds) || accountsStore.getAccountStatementDate(filter.accountIds) !== accountsStore.getAccountStatementDate(this.transactionsFilter.accountIds))) {
|
||||||
if (datetimeConstants.allBillingCycleDateRangesMap[this.transactionsFilter.dateType] && !accountsStore.getAccountStatementDate(this.transactionsFilter.accountIds)) {
|
|
||||||
this.transactionsFilter.dateType = datetimeConstants.allDateRanges.Custom.type;
|
this.transactionsFilter.dateType = datetimeConstants.allDateRanges.Custom.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.transactionsFilter.accountIds = filter.accountIds;
|
||||||
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user