afaneca / myfin

Web frontend for the personal finances platform that'll help you budget, keep track of your income/spending and forecast your financial future.

Home Page:https://myfin.afaneca.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investment assets: change way price per unit is calculated

afaneca opened this issue · comments

Currently:

[PRICE_PER_UNIT] = [CURRENTLY INVESTED VALUE] / [NR OF UNITS]

This should be changed to reflect the actual average price at which the asset was bought.
So, instead of being calculated on the frontend, /invest/assets/ should return that value already calculated in its payload.