wealthfolio icon indicating copy to clipboard operation
wealthfolio copied to clipboard

Activities - Change quantity and price to decimal

Open February30th opened this issue 1 year ago • 7 comments

The activity quantity and price are coded a f64, this creates an issue with fractional shares.

February30th avatar Sep 06 '24 16:09 February30th

what is the issue with f64? You can log decimal values for quantity and price.

afadil avatar Sep 06 '24 17:09 afadil

Example csv to reproduce decimal issues

date,symbol,quantity,activityType,unitPrice,currency,fee
2024-07-05 10:00:43.343,BMW3.DE,0.0481040000,BUY,83.15,EUR,0
2024-07-16 08:20:07.675,BMW3.DE,0.1925370000,BUY,83.1,EUR,0
2024-07-22 10:56:01.155,BMW3.DE,0.2406410000,SELL,84.55,EUR,0

February30th avatar Sep 06 '24 19:09 February30th

Also noticed that the sql fields are created as NUMERIC instead of a DECIMAL

February30th avatar Sep 06 '24 20:09 February30th

Yeah it would be really good to support decimal to accomodate fractional shares

shivasurya avatar Sep 07 '24 21:09 shivasurya

The already support franctional shares. I have no problem importing the CSV example you provided: Screenshot 2024-09-07 at 5 58 44 PM

afadil avatar Sep 07 '24 22:09 afadil

Check the holdings tab.

February30th avatar Sep 09 '24 11:09 February30th

I also have this issue where one of my holdings (fully sold) is still listed as having 4.20692347383774e-16 units left

araishikeiwai avatar Sep 09 '24 14:09 araishikeiwai

Done in v1.0.18

afadil avatar Oct 05 '24 19:10 afadil