Browse Source

Fix dividend calculation

pull/5335/head
Thomas Kaul 2 weeks ago
parent
commit
5849423e42
  1. 3
      apps/api/src/app/portfolio/portfolio.service.ts

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

@ -186,6 +186,7 @@ export class PortfolioService {
currency,
date,
isDraft,
quantity,
SymbolProfile,
type,
unitPrice
@ -194,7 +195,7 @@ export class PortfolioService {
case ActivityType.DIVIDEND:
dividendInBaseCurrency +=
await this.exchangeRateDataService.toCurrencyAtDate(
unitPrice,
new Big(quantity).mul(unitPrice).toNumber(),
currency ?? SymbolProfile.currency,
userCurrency,
date

Loading…
Cancel
Save