Feature/exclude fees from holdings (#3160)
This commit is contained in:
parent
e21563d903
commit
7e28e42995
@ -356,16 +356,22 @@ export class PortfolioService {
|
||||
(user.Settings?.settings as UserSettings)?.emergencyFund ?? 0
|
||||
);
|
||||
|
||||
let types = getAllActivityTypes().filter((activityType) => {
|
||||
return activityType !== 'FEE';
|
||||
});
|
||||
|
||||
if (withLiabilities === false) {
|
||||
types = types.filter((activityType) => {
|
||||
return activityType !== 'LIABILITY';
|
||||
});
|
||||
}
|
||||
|
||||
const { activities, portfolioOrders, transactionPoints } =
|
||||
await this.getTransactionPoints({
|
||||
filters,
|
||||
types,
|
||||
userId,
|
||||
withExcludedAccounts,
|
||||
types: withLiabilities
|
||||
? undefined
|
||||
: getAllActivityTypes().filter((activityType) => {
|
||||
return activityType !== 'LIABILITY';
|
||||
})
|
||||
withExcludedAccounts
|
||||
});
|
||||
|
||||
const portfolioCalculator = new PortfolioCalculator({
|
||||
|
@ -139,7 +139,7 @@ export function extractNumberFromString({
|
||||
}
|
||||
|
||||
export function getAllActivityTypes(): ActivityType[] {
|
||||
return ['BUY', 'DIVIDEND', 'FEE', 'ITEM', 'LIABILITY', 'SELL'];
|
||||
return Object.values(ActivityType);
|
||||
}
|
||||
|
||||
export function getAssetProfileIdentifier({ dataSource, symbol }: UniqueAsset) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user