Browse Source

Bugfix/dividend values in base currency (#7633)

* Fix missing currency conversion of dividends

* Update changelog
pull/7634/head^2
Thomas Kaul 3 days ago
committed by GitHub
parent
commit
e14793c698
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 3
      apps/api/src/app/portfolio/portfolio.controller.ts
  3. 12
      apps/api/src/app/portfolio/portfolio.service.ts

4
CHANGELOG.md

@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Extended the `GET api/v1/access` endpoint by the scopes
- Extended the `GET api/v1/user` endpoint by the scopes
### Fixed
- Fixed the missing currency conversion of the dividends on the analysis page
## 3.51.0 - 2026-08-14
### Changed

3
apps/api/src/app/portfolio/portfolio.controller.ts

@ -352,8 +352,7 @@ export class PortfolioController {
let dividends = this.portfolioService.getDividends({
activities,
groupBy,
userCurrency
groupBy
});
if (

12
apps/api/src/app/portfolio/portfolio.service.ts

@ -358,21 +358,15 @@ export class PortfolioService {
public getDividends({
activities,
groupBy,
userCurrency
groupBy
}: {
activities: Activity[];
groupBy?: GroupBy;
userCurrency: string;
}): InvestmentItem[] {
let dividends = activities.map(({ currency, date, value }) => {
let dividends = activities.map(({ date, valueInBaseCurrency }) => {
return {
date: format(date, DATE_FORMAT),
investment: this.exchangeRateDataService.toCurrency(
value,
currency,
userCurrency
)
investment: valueInBaseCurrency
};
});

Loading…
Cancel
Save