Browse Source

Bugfix/fix todays performance and chart calculation (#1333)

* Fix today's performance and chart calculation

* Update changelog
pull/1337/head
Thomas Kaul 3 years ago
committed by GitHub
parent
commit
b018819a1f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 5
      apps/api/src/app/portfolio/portfolio-calculator.ts

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed an issue in the performance and chart calculation of today
- Fixed the alignment of the value component in the admin control panel - Fixed the alignment of the value component in the admin control panel
## 1.202.0 - 07.10.2022 ## 1.202.0 - 07.10.2022

5
apps/api/src/app/portfolio/portfolio-calculator.ts

@ -14,6 +14,7 @@ import {
format, format,
isAfter, isAfter,
isBefore, isBefore,
isSameDay,
isSameMonth, isSameMonth,
isSameYear, isSameYear,
max, max,
@ -187,7 +188,9 @@ export class PortfolioCalculator {
day = addDays(day, step); day = addDays(day, step);
} }
dates.push(resetHours(end)); if (!isSameDay(last(dates), end)) {
dates.push(resetHours(end));
}
for (const item of transactionPointsBeforeEndDate[firstIndex - 1].items) { for (const item of transactionPointsBeforeEndDate[firstIndex - 1].items) {
dataGatheringItems.push({ dataGatheringItems.push({

Loading…
Cancel
Save