|
|
@ -13,6 +13,7 @@ import { IDataGatheringItem } from '@ghostfolio/api/services/interfaces/interfac |
|
|
|
import { PortfolioSnapshotService } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service'; |
|
|
|
import { getIntervalFromDateRange } from '@ghostfolio/common/calculation-helper'; |
|
|
|
import { |
|
|
|
INVESTMENT_ACTIVITY_TYPES, |
|
|
|
PORTFOLIO_SNAPSHOT_PROCESS_JOB_NAME, |
|
|
|
PORTFOLIO_SNAPSHOT_PROCESS_JOB_OPTIONS, |
|
|
|
PORTFOLIO_SNAPSHOT_COMPUTATION_QUEUE_PRIORITY_HIGH, |
|
|
@ -898,6 +899,7 @@ export abstract class PortfolioCalculator { |
|
|
|
} of this.activities) { |
|
|
|
let currentTransactionPointItem: TransactionPointSymbol; |
|
|
|
|
|
|
|
if (INVESTMENT_ACTIVITY_TYPES.includes(type)) { |
|
|
|
const currency = SymbolProfile.currency; |
|
|
|
const dataSource = SymbolProfile.dataSource; |
|
|
|
const factor = getFactor(type); |
|
|
@ -962,6 +964,7 @@ export abstract class PortfolioCalculator { |
|
|
|
); |
|
|
|
|
|
|
|
symbols[SymbolProfile.symbol] = currentTransactionPointItem; |
|
|
|
} |
|
|
|
|
|
|
|
const items = lastTransactionPoint?.items ?? []; |
|
|
|
|
|
|
@ -969,7 +972,9 @@ export abstract class PortfolioCalculator { |
|
|
|
return symbol !== SymbolProfile.symbol; |
|
|
|
}); |
|
|
|
|
|
|
|
if (currentTransactionPointItem) { |
|
|
|
newItems.push(currentTransactionPointItem); |
|
|
|
} |
|
|
|
|
|
|
|
newItems.sort((a, b) => { |
|
|
|
return a.symbol?.localeCompare(b.symbol); |
|
|
|