Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Bugfix/total fee calculation related to activities in custom currency (#6191)

Thomas Kaul6727fb2b74e9
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5063cae440..431218b216 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 4bc10bd495..d9783f34c4 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: