achannarasappa / ticker

Terminal stock ticker with live updates and position tracking
GNU General Public License v3.0
5.01k stars 273 forks source link

currency-summary-only=true -> dayChange in summary is not converted #228

Closed spatnynick closed 2 years ago

spatnynick commented 2 years ago

Hi if you set currency-summary-only to true and a currency to e.g. EUR and add lots in different currencies, the holdingSummary.Value and holdingSummary.Cost is well converted, but not the holdingSummary.DayChange.Amount

imho in asset.go -> func addHoldingToHoldingSummary, this line should be changed from: dayChange := holdingSummary.DayChange.Amount + holding.DayChange.Amount to probably this one, then it looks fine: dayChange := holdingSummary.DayChange.Amount + (holding.DayChange.Amount * currencyRateByUse.SummaryValue)

br Bohuslav

achannarasappa commented 2 years ago

Duplicate of #229