|
|
@ -778,6 +778,7 @@ export class PortfolioService { |
|
|
if (activities.length === 0) { |
|
|
if (activities.length === 0) { |
|
|
return { |
|
|
return { |
|
|
activities: [], |
|
|
activities: [], |
|
|
|
|
|
activitiesCount: 0, |
|
|
averagePrice: undefined, |
|
|
averagePrice: undefined, |
|
|
dataProviderInfo: undefined, |
|
|
dataProviderInfo: undefined, |
|
|
dividendInBaseCurrency: undefined, |
|
|
dividendInBaseCurrency: undefined, |
|
|
@ -802,7 +803,6 @@ export class PortfolioService { |
|
|
quantity: undefined, |
|
|
quantity: undefined, |
|
|
SymbolProfile: undefined, |
|
|
SymbolProfile: undefined, |
|
|
tags: [], |
|
|
tags: [], |
|
|
transactionCount: undefined, |
|
|
|
|
|
value: undefined |
|
|
value: undefined |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
@ -847,8 +847,7 @@ export class PortfolioService { |
|
|
quantity, |
|
|
quantity, |
|
|
tags, |
|
|
tags, |
|
|
timeWeightedInvestment, |
|
|
timeWeightedInvestment, |
|
|
timeWeightedInvestmentWithCurrencyEffect, |
|
|
timeWeightedInvestmentWithCurrencyEffect |
|
|
transactionCount |
|
|
|
|
|
} = holding; |
|
|
} = holding; |
|
|
|
|
|
|
|
|
const activitiesOfHolding = activities.filter(({ SymbolProfile }) => { |
|
|
const activitiesOfHolding = activities.filter(({ SymbolProfile }) => { |
|
|
@ -966,8 +965,8 @@ export class PortfolioService { |
|
|
marketPriceMin, |
|
|
marketPriceMin, |
|
|
SymbolProfile, |
|
|
SymbolProfile, |
|
|
tags, |
|
|
tags, |
|
|
transactionCount, |
|
|
|
|
|
activities: activitiesOfHolding, |
|
|
activities: activitiesOfHolding, |
|
|
|
|
|
activitiesCount: activitiesOfHolding.length, |
|
|
averagePrice: averagePrice.toNumber(), |
|
|
averagePrice: averagePrice.toNumber(), |
|
|
dataProviderInfo: portfolioCalculator.getDataProviderInfos()?.[0], |
|
|
dataProviderInfo: portfolioCalculator.getDataProviderInfos()?.[0], |
|
|
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(), |
|
|
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(), |
|
|
@ -1070,6 +1069,7 @@ export class PortfolioService { |
|
|
marketPriceMin, |
|
|
marketPriceMin, |
|
|
SymbolProfile, |
|
|
SymbolProfile, |
|
|
activities: [], |
|
|
activities: [], |
|
|
|
|
|
activitiesCount: 0, |
|
|
averagePrice: 0, |
|
|
averagePrice: 0, |
|
|
dataProviderInfo: undefined, |
|
|
dataProviderInfo: undefined, |
|
|
dividendInBaseCurrency: 0, |
|
|
dividendInBaseCurrency: 0, |
|
|
@ -1095,7 +1095,6 @@ export class PortfolioService { |
|
|
}, |
|
|
}, |
|
|
quantity: 0, |
|
|
quantity: 0, |
|
|
tags: [], |
|
|
tags: [], |
|
|
transactionCount: undefined, |
|
|
|
|
|
value: 0 |
|
|
value: 0 |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|