From 6727fb2b74e9f694445670f4e9c0b5fda27dfe3c Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 14 Jan 2026 20:25:59 +0100 Subject: [PATCH] Bugfix/total fee calculation related to activities in custom currency (#6191) * Fix total fee calculation related to activities in custom currency * Update changelog --- CHANGELOG.md | 5 +++++ apps/api/src/app/portfolio/portfolio.service.ts | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5063cae44..431218b21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Restored the support for specific calendar year date ranges (`2024`, `2023`, `2022`, etc.) in the holdings table (experimental) +### Fixed + +- Fixed the total fee calculation in the holding detail dialog related to activities in a custom currency +- Fixed the total fee calculation in the summary related to activities in a custom currency + ## 2.229.0 - 2026-01-11 ### Changed diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 4bc10bd49..d9783f34c 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -792,7 +792,7 @@ export class PortfolioService { averagePrice, currency, dividendInBaseCurrency, - fee, + feeInBaseCurrency, firstBuyDate, grossPerformance, grossPerformancePercentage, @@ -928,11 +928,7 @@ export class PortfolioService { dividendYieldPercent: dividendYieldPercent.toNumber(), dividendYieldPercentWithCurrencyEffect: dividendYieldPercentWithCurrencyEffect.toNumber(), - feeInBaseCurrency: this.exchangeRateDataService.toCurrency( - fee.toNumber(), - SymbolProfile.currency, - userCurrency - ), + feeInBaseCurrency: feeInBaseCurrency.toNumber(), grossPerformance: grossPerformance?.toNumber(), grossPerformancePercent: grossPerformancePercentage?.toNumber(), grossPerformancePercentWithCurrencyEffect: