|
@ -1390,8 +1390,37 @@ export class PortfolioService { |
|
|
userId: string; |
|
|
userId: string; |
|
|
}) { |
|
|
}) { |
|
|
userId = await this.getUserId(impersonationId, userId); |
|
|
userId = await this.getUserId(impersonationId, userId); |
|
|
|
|
|
let symbolProfile = await this.symbolProfileService.getSymbolProfiles([ |
|
|
await this.orderService.assignTags({ dataSource, symbol, tags, userId }); |
|
|
{ |
|
|
|
|
|
dataSource, |
|
|
|
|
|
symbol |
|
|
|
|
|
} |
|
|
|
|
|
])[0]; |
|
|
|
|
|
await this.symbolProfileService.updateSymbolProfile({ |
|
|
|
|
|
assetClass: symbolProfile.assetClass, |
|
|
|
|
|
assetSubClass: symbolProfile.assetSubClass, |
|
|
|
|
|
countries: symbolProfile.countries, |
|
|
|
|
|
currency: symbolProfile.currency, |
|
|
|
|
|
dataSource, |
|
|
|
|
|
holdings: symbolProfile.holdings, |
|
|
|
|
|
name: symbolProfile.name, |
|
|
|
|
|
sectors: symbolProfile.sectors, |
|
|
|
|
|
symbol, |
|
|
|
|
|
tags: { |
|
|
|
|
|
connectOrCreate: tags.map(({ id, name }) => { |
|
|
|
|
|
return { |
|
|
|
|
|
create: { |
|
|
|
|
|
id, |
|
|
|
|
|
name |
|
|
|
|
|
}, |
|
|
|
|
|
where: { |
|
|
|
|
|
id |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
url: symbolProfile.url |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@LogPerformance |
|
|
@LogPerformance |
|
@ -1762,7 +1791,9 @@ export class PortfolioService { |
|
|
.plus(emergencyFundPositionsValueInBaseCurrency) |
|
|
.plus(emergencyFundPositionsValueInBaseCurrency) |
|
|
.toNumber(); |
|
|
.toNumber(); |
|
|
|
|
|
|
|
|
const committedFunds = new Big(totalBuy).minus(totalSell); |
|
|
const committedFunds = new Big(totalBuy) |
|
|
|
|
|
.minus(totalSell) |
|
|
|
|
|
.minus(dividendInBaseCurrency); |
|
|
|
|
|
|
|
|
const totalOfExcludedActivities = this.getSumOfActivityType({ |
|
|
const totalOfExcludedActivities = this.getSumOfActivityType({ |
|
|
userCurrency, |
|
|
userCurrency, |
|
|