mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 00:34:28 +08:00
add billing cycle date range filter
This commit is contained in:
@@ -152,6 +152,7 @@ import { useAccountsStore } from '@/stores/account.js';
|
||||
import { useTransactionsStore } from '@/stores/transaction.js';
|
||||
import { useStatisticsStore } from '@/stores/statistics.js';
|
||||
|
||||
import datetimeConstants from '@/consts/datetime.js';
|
||||
import accountConstants from '@/consts/account.js';
|
||||
import { copyObjectTo } from '@/lib/common.js';
|
||||
import {
|
||||
@@ -322,9 +323,15 @@ export default {
|
||||
self.statisticsStore.updateTransactionStatisticsInvalidState(true);
|
||||
}
|
||||
} else if (this.type === 'transactionListCurrent') {
|
||||
changed = self.transactionsStore.updateTransactionListFilter({
|
||||
const filter = {
|
||||
accountIds: isAllSelected ? '' : finalAccountIds
|
||||
});
|
||||
};
|
||||
|
||||
if (datetimeConstants.allBillingCycleDateRangesMap[self.transactionsStore.transactionsFilter.dateType] && !self.accountsStore.getAccountStatementDate(filter.accountIds)) {
|
||||
filter.dateType = datetimeConstants.allDateRanges.Custom.type;
|
||||
}
|
||||
|
||||
changed = self.transactionsStore.updateTransactionListFilter(filter);
|
||||
|
||||
if (changed) {
|
||||
self.transactionsStore.updateTransactionListInvalidState(true);
|
||||
|
||||
Reference in New Issue
Block a user