Thomas
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
14 additions and
12 deletions
-
CHANGELOG.md
-
apps/api/src/models/portfolio.ts
-
package.json
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. |
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
|
|
|
|
|
|
|
|
|
## 1.23.1 - 03.07.2021 |
|
|
|
|
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
|
|
- Fixed the investment chart (drafts) |
|
|
|
|
|
|
|
|
## 1.23.0 - 03.07.2021 |
|
|
## 1.23.0 - 03.07.2021 |
|
|
|
|
|
|
|
|
### Added |
|
|
### Added |
|
|
|
@ -118,23 +118,19 @@ export class Portfolio implements PortfolioInterface { |
|
|
this.getOrders() |
|
|
this.getOrders() |
|
|
.filter((order) => order.getIsDraft() === true) |
|
|
.filter((order) => order.getIsDraft() === true) |
|
|
.forEach((order) => { |
|
|
.forEach((order) => { |
|
|
|
|
|
investment += this.exchangeRateDataService.toCurrency( |
|
|
|
|
|
order.getTotal(), |
|
|
|
|
|
order.getCurrency(), |
|
|
|
|
|
this.user.Settings.currency |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
const portfolioItem = this.portfolioItems.find((item) => { |
|
|
const portfolioItem = this.portfolioItems.find((item) => { |
|
|
return item.date === order.getDate(); |
|
|
return item.date === order.getDate(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if (portfolioItem) { |
|
|
if (portfolioItem) { |
|
|
portfolioItem.investment += this.exchangeRateDataService.toCurrency( |
|
|
portfolioItem.investment = investment; |
|
|
order.getTotal(), |
|
|
|
|
|
order.getCurrency(), |
|
|
|
|
|
this.user.Settings.currency |
|
|
|
|
|
); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
investment += this.exchangeRateDataService.toCurrency( |
|
|
|
|
|
order.getTotal(), |
|
|
|
|
|
order.getCurrency(), |
|
|
|
|
|
this.user.Settings.currency |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
this.portfolioItems.push({ |
|
|
this.portfolioItems.push({ |
|
|
investment, |
|
|
investment, |
|
|
date: order.getDate(), |
|
|
date: order.getDate(), |
|
|
|
@ -1,6 +1,6 @@ |
|
|
{ |
|
|
{ |
|
|
"name": "ghostfolio", |
|
|
"name": "ghostfolio", |
|
|
"version": "1.23.0", |
|
|
"version": "1.23.1", |
|
|
"homepage": "https://ghostfol.io", |
|
|
"homepage": "https://ghostfol.io", |
|
|
"license": "AGPL-3.0", |
|
|
"license": "AGPL-3.0", |
|
|
"scripts": { |
|
|
"scripts": { |
|
|