Browse Source
Bugfix/total buy and sell calculation in summary (#5759)
* Fix total buy and sell calculation related to activities in custom currency
* Update changelog
pull/5775/head
Thomas Kaul
1 day ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.service.ts
|
|
@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed an issue with the total buy and sell calculation in the summary related to activities in a custom currency |
|
|
|
- Respected the include indices flag in the search functionality of the _Financial Modeling Prep_ service |
|
|
|
- Fixed an issue where the scroll position was not restored when changing pages |
|
|
|
- Fixed the word wrap in the menus of the activities table component |
|
|
|
|
|
@ -2126,11 +2126,11 @@ export class PortfolioService { |
|
|
|
.filter(({ isDraft, type }) => { |
|
|
|
return isDraft === false && type === activityType; |
|
|
|
}) |
|
|
|
.map(({ quantity, SymbolProfile, unitPrice }) => { |
|
|
|
.map(({ currency, quantity, SymbolProfile, unitPrice }) => { |
|
|
|
return new Big( |
|
|
|
this.exchangeRateDataService.toCurrency( |
|
|
|
new Big(quantity).mul(unitPrice).toNumber(), |
|
|
|
SymbolProfile.currency, |
|
|
|
currency ?? SymbolProfile.currency, |
|
|
|
userCurrency |
|
|
|
) |
|
|
|
); |
|
|
|