mystocksportfolio / issues

Submit issues, bugs, feature requests for the My Stocks Portfolio app
4 stars 0 forks source link

Android: Incorrect buy value calculation for stock #381

Closed mnsrt closed 4 weeks ago

mnsrt commented 1 month ago

Description: There seems to be an error in calculating the buy value for stocks in the app. I have purchased 739 shares of XX.YY stock at a price of €9.8676 each, which should total €7294.1564, so, rounding it to two decimal places, it should be €7292.16 . However, the app shows a buy value of €7292.13, which is incorrect. Please verify and correct the calculation logic.

Steps to reproduce: Enter a purchase of 739 shares of a stock at a price of €9.8676 Observe the calculated buy value shown in the portfolio.

Expected behavior: The buy value should be calculated as: 739 shares * €9.8676 = €7294.16

Actual behavior: The app shows the buy value as €7292.13, which is slightly lower than the actual value.

App version: 2.982 image

mikezliu commented 4 weeks ago

I'm not able to repro (See screenshot)

image

It's possible you have more decimals in the transaction that's not set to show on this page due to 4 decimal precision. For example 9.8675612345 * 739 would round to 7292.13 and not 7292.16