mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 00:12:11 +08:00
trend analysis supports aggregating amounts by month / quarter / year
This commit is contained in:
@@ -754,7 +754,7 @@ export const useStatisticsStore = defineStore('statistics', {
|
||||
|
||||
return changed;
|
||||
},
|
||||
getTransactionStatisticsPageParams(analysisType) {
|
||||
getTransactionStatisticsPageParams(analysisType, trendDateAggregationType) {
|
||||
const querys = [];
|
||||
|
||||
querys.push('analysisType=' + analysisType);
|
||||
@@ -776,6 +776,10 @@ export const useStatisticsStore = defineStore('statistics', {
|
||||
querys.push('startTime=' + this.transactionStatisticsFilter.trendChartStartYearMonth);
|
||||
querys.push('endTime=' + this.transactionStatisticsFilter.trendChartEndYearMonth);
|
||||
}
|
||||
|
||||
if (trendDateAggregationType !== statisticsConstants.allDateAggregationTypes.Month.type) {
|
||||
querys.push('trendDateAggregationType=' + trendDateAggregationType);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.transactionStatisticsFilter.filterAccountIds) {
|
||||
@@ -798,7 +802,7 @@ export const useStatisticsStore = defineStore('statistics', {
|
||||
|
||||
return querys.join('&');
|
||||
},
|
||||
getTransactionListPageParams(analysisType, item, dateRange) {
|
||||
getTransactionListPageParams(analysisType, itemId, dateRange) {
|
||||
const accountsStore = useAccountsStore();
|
||||
const transactionCategoriesStore = useTransactionCategoriesStore();
|
||||
const querys = [];
|
||||
@@ -819,7 +823,7 @@ export const useStatisticsStore = defineStore('statistics', {
|
||||
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.ExpenseByAccount.type
|
||||
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.AccountTotalAssets.type
|
||||
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.AccountTotalLiabilities.type) {
|
||||
querys.push('accountIds=' + item.id);
|
||||
querys.push('accountIds=' + itemId);
|
||||
|
||||
if (!isObjectEmpty(this.transactionStatisticsFilter.filterCategoryIds)) {
|
||||
querys.push('categoryIds=' + getFinalCategoryIdsByFilteredCategoryIds(transactionCategoriesStore.allTransactionCategoriesMap, this.transactionStatisticsFilter.filterCategoryIds));
|
||||
@@ -828,7 +832,7 @@ export const useStatisticsStore = defineStore('statistics', {
|
||||
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.IncomeBySecondaryCategory.type
|
||||
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.ExpenseByPrimaryCategory.type
|
||||
|| this.transactionStatisticsFilter.chartDataType === statisticsConstants.allChartDataTypes.ExpenseBySecondaryCategory.type) {
|
||||
querys.push('categoryIds=' + item.id);
|
||||
querys.push('categoryIds=' + itemId);
|
||||
|
||||
if (!isObjectEmpty(this.transactionStatisticsFilter.filterAccountIds)) {
|
||||
querys.push('accountIds=' + getFinalAccountIdsByFilteredAccountIds(accountsStore.allAccountsMap, this.transactionStatisticsFilter.filterAccountIds));
|
||||
|
||||
Reference in New Issue
Block a user