Browse Source
Merge branch 'main' into bugfix/total-fee-calculation-related-to-activities-in-custom-currency-part-2
pull/6199/head
Thomas Kaul
4 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
5 additions and
5 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/calculator/portfolio-calculator.ts
-
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts
-
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-valuable.spec.ts
|
|
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed a numeric parsing error related to cash positions on the _X-ray_ page |
|
|
|
- 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 |
|
|
|
|
|
|
|
|
|
|
|
@ -429,9 +429,8 @@ export abstract class PortfolioCalculator { |
|
|
|
investment: totalInvestment, |
|
|
|
investmentWithCurrencyEffect: totalInvestmentWithCurrencyEffect, |
|
|
|
marketPrice: |
|
|
|
marketSymbolMap[endDateString]?.[item.symbol]?.toNumber() ?? null, |
|
|
|
marketPriceInBaseCurrency: |
|
|
|
marketPriceInBaseCurrency?.toNumber() ?? null, |
|
|
|
marketSymbolMap[endDateString]?.[item.symbol]?.toNumber() ?? 1, |
|
|
|
marketPriceInBaseCurrency: marketPriceInBaseCurrency?.toNumber() ?? 1, |
|
|
|
netPerformance: !hasErrors ? (netPerformance ?? null) : null, |
|
|
|
netPerformancePercentage: !hasErrors |
|
|
|
? (netPerformancePercentage ?? null) |
|
|
|
|
|
|
|
@ -247,7 +247,7 @@ describe('PortfolioCalculator', () => { |
|
|
|
includeInTotalAssetValue: false, |
|
|
|
investment: new Big(1820), |
|
|
|
investmentWithCurrencyEffect: new Big(1750), |
|
|
|
marketPrice: null, |
|
|
|
marketPrice: 1, |
|
|
|
marketPriceInBaseCurrency: 0.91, |
|
|
|
netPerformance: new Big(0), |
|
|
|
netPerformancePercentage: new Big(0), |
|
|
|
|
|
|
|
@ -130,7 +130,7 @@ describe('PortfolioCalculator', () => { |
|
|
|
grossPerformanceWithCurrencyEffect: new Big('0'), |
|
|
|
investment: new Big('500000'), |
|
|
|
investmentWithCurrencyEffect: new Big('500000'), |
|
|
|
marketPrice: null, |
|
|
|
marketPrice: 1, |
|
|
|
marketPriceInBaseCurrency: 500000, |
|
|
|
netPerformance: new Big('0'), |
|
|
|
netPerformancePercentage: new Big('0'), |
|
|
|
|