|
@ -470,9 +470,8 @@ export class PortfolioService { |
|
|
transactionPoints[0]?.date ?? format(new Date(), DATE_FORMAT) |
|
|
transactionPoints[0]?.date ?? format(new Date(), DATE_FORMAT) |
|
|
); |
|
|
); |
|
|
const startDate = this.getStartDate(dateRange, portfolioStart); |
|
|
const startDate = this.getStartDate(dateRange, portfolioStart); |
|
|
const currentPositions = await portfolioCalculator.getCurrentPositions( |
|
|
const currentPositions = |
|
|
startDate |
|
|
await portfolioCalculator.getCurrentPositions(startDate); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const cashDetails = await this.accountService.getCashDetails({ |
|
|
const cashDetails = await this.accountService.getCashDetails({ |
|
|
filters, |
|
|
filters, |
|
@ -810,9 +809,8 @@ export class PortfolioService { |
|
|
const transactionPoints = portfolioCalculator.getTransactionPoints(); |
|
|
const transactionPoints = portfolioCalculator.getTransactionPoints(); |
|
|
|
|
|
|
|
|
const portfolioStart = parseDate(transactionPoints[0].date); |
|
|
const portfolioStart = parseDate(transactionPoints[0].date); |
|
|
const currentPositions = await portfolioCalculator.getCurrentPositions( |
|
|
const currentPositions = |
|
|
portfolioStart |
|
|
await portfolioCalculator.getCurrentPositions(portfolioStart); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const position = currentPositions.positions.find( |
|
|
const position = currentPositions.positions.find( |
|
|
(item) => item.symbol === aSymbol |
|
|
(item) => item.symbol === aSymbol |
|
@ -1046,9 +1044,8 @@ export class PortfolioService { |
|
|
|
|
|
|
|
|
const portfolioStart = parseDate(transactionPoints[0].date); |
|
|
const portfolioStart = parseDate(transactionPoints[0].date); |
|
|
const startDate = this.getStartDate(dateRange, portfolioStart); |
|
|
const startDate = this.getStartDate(dateRange, portfolioStart); |
|
|
const currentPositions = await portfolioCalculator.getCurrentPositions( |
|
|
const currentPositions = |
|
|
startDate |
|
|
await portfolioCalculator.getCurrentPositions(startDate); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const positions = currentPositions.positions.filter( |
|
|
const positions = currentPositions.positions.filter( |
|
|
(item) => !item.quantity.eq(0) |
|
|
(item) => !item.quantity.eq(0) |
|
@ -1238,9 +1235,8 @@ export class PortfolioService { |
|
|
portfolioCalculator.setTransactionPoints(transactionPoints); |
|
|
portfolioCalculator.setTransactionPoints(transactionPoints); |
|
|
|
|
|
|
|
|
const portfolioStart = parseDate(transactionPoints[0].date); |
|
|
const portfolioStart = parseDate(transactionPoints[0].date); |
|
|
const currentPositions = await portfolioCalculator.getCurrentPositions( |
|
|
const currentPositions = |
|
|
portfolioStart |
|
|
await portfolioCalculator.getCurrentPositions(portfolioStart); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const positions = currentPositions.positions.filter( |
|
|
const positions = currentPositions.positions.filter( |
|
|
(item) => !item.quantity.eq(0) |
|
|
(item) => !item.quantity.eq(0) |
|
|