mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 02:04:26 +08:00
total outflows / inflows do not include transfer transactions between unfiltered accounts
This commit is contained in:
@@ -585,10 +585,22 @@ export const useStatisticsStore = defineStore('statistics', () => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
totalAmount += item.amountInDefaultCurrency;
|
let includeInTotal: boolean = true;
|
||||||
|
|
||||||
if (item.amountInDefaultCurrency > 0) {
|
// total outflows / inflows do not include transfer transactions between unfiltered accounts
|
||||||
totalNonNegativeAmount += item.amountInDefaultCurrency;
|
if (transactionStatisticsFilter.chartDataType === ChartDataType.OutflowsByAccount.type ||
|
||||||
|
transactionStatisticsFilter.chartDataType === ChartDataType.InflowsByAccount.type) {
|
||||||
|
if (item.relatedAccount && (!transactionStatisticsFilter.filterAccountIds || !transactionStatisticsFilter.filterAccountIds[item.relatedAccount.id])) {
|
||||||
|
includeInTotal = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (includeInTotal) {
|
||||||
|
totalAmount += item.amountInDefaultCurrency;
|
||||||
|
|
||||||
|
if (item.amountInDefaultCurrency > 0) {
|
||||||
|
totalNonNegativeAmount += item.amountInDefaultCurrency;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allDataItems[item.account.id] = data;
|
allDataItems[item.account.id] = data;
|
||||||
|
|||||||
Reference in New Issue
Block a user