- {{ statisticsData.totalAmount | currency(defaultCurrency) }}
+ {{ statisticsData.totalAmount | currency(defaultCurrency) | finalAmount(showAccountBalance, query.chartDataType, allChartDataTypes) }}
- {{ item.totalAmount | currency(item.currency || defaultCurrency) }}
+ {{ item.totalAmount | currency(item.currency || defaultCurrency) | finalAmount(showAccountBalance, query.chartDataType, allChartDataTypes) }}
@@ -255,6 +256,7 @@ export default {
loading: true,
loadingError: null,
sortBy: self.$settings.getStatisticsSortingType(),
+ showAccountBalance: self.$settings.isShowAccountBalance(),
showChartDataTypePopover: false,
showDatePopover: false,
showCustomDateRangeSheet: false,
@@ -355,6 +357,14 @@ export default {
totalAmount: combinedData.totalAmount,
items: allStatisticsItems
};
+ },
+ showAmountInChart() {
+ if (!this.showAccountBalance
+ && (this.query.chartDataType === this.allChartDataTypes.AccountTotalAssets.type || this.query.chartDataType === this.allChartDataTypes.AccountTotalLiabilities.type)) {
+ return false;
+ }
+
+ return true;
}
},
created() {
@@ -605,6 +615,13 @@ export default {
}
},
filters: {
+ finalAmount(amount, isShowAccountBalance, dataType, allChartDataTypes) {
+ if (!isShowAccountBalance && (dataType === allChartDataTypes.AccountTotalAssets.type || dataType === allChartDataTypes.AccountTotalLiabilities.type)) {
+ return '***';
+ }
+
+ return amount;
+ },
chartDataTypeName(dataType, allChartDataTypes) {
for (let chartDataTypeField in allChartDataTypes) {
if (!Object.prototype.hasOwnProperty.call(allChartDataTypes, chartDataTypeField)) {