Bug 506511 - insufficient number of decimal places in stock quantity
Summary: insufficient number of decimal places in stock quantity
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.1.3
Platform: Microsoft Windows Microsoft Windows
: NOR grave
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-02 22:20 UTC by stpaulchuck
Modified: 2025-07-07 23:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stpaulchuck 2025-07-02 22:20:24 UTC
SUMMARY
when importing QIF file from Quicken stock account KMyMoney only uses two decimal places which is insufficient if the account has dividend reinvestment. This is a show stopper.

STEPS TO REPRODUCE
1. export a stock account from Quicken in QIF format
2. import the QIF file
3. open the KMM account and observe the 'quantity' column

OBSERVED RESULT
only two decimal places in Quantity column

EXPECTED RESULT
generally four to six places or settable by user

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
this is a show stopper as the total dollar value is wrong as is the total shares
Comment 1 stpaulchuck 2025-07-02 22:24:04 UTC
I am trying to convert from Quicken to KMM, but this is a show stopper. I do not have the absolute latest as I am on a MS Windows system. Did a later version fix this?
Comment 2 Jack 2025-07-02 23:32:30 UTC
I don't recall this being an issue with 5.1.3, but you might test 5.2.0 just in case.  I have never used the Quicken import, but I'm sure there is a way to get this right, as KMM certainly handles more decimal places than just two.  I might be necessary to edit the quicken file before importing, but it would take some research to figure out exactly what needs to be done.
Comment 3 stpaulchuck 2025-07-04 15:53:16 UTC
this is the Windows version, it is an Investment account, it is a stock. I tried to manually enter a 4 decimal value in the quantity column and the program rounded it to 2 places. The QIF file has the full info including decimal places as shown in Quicken (I read the file contents). Something in this version is truncating the value whether a QIF entry or a manual entry.

I'd love to try 5.2. Where do I find a Windows version?
Comment 4 Jack 2025-07-04 15:59:38 UTC
See https://kmymoney.org/windows.html for download.  What might be necessary (just off the top of my head, no certainty) is that you may need to do the import, then modify the stock account to increase the precision, then edit the transactions to fix the values.  
(I don't have a currently working Windows instance to test there, but I don't suspect this to be Windows specific.)
Comment 5 stpaulchuck 2025-07-04 17:03:48 UTC
I downloaded 5.2, now I'm going  to install it  and see what  we've got.
Comment 6 stpaulchuck 2025-07-06 20:21:51 UTC
EUREKA! finally figured it out. This is not a bug, per se.

After installing the the 5.2 upgrade with no changes to the decimal count, I thought on it and wandered the accounts for a bit when it hit me. If you have any stocks or other investments, click the 'Investments' top choice. Look at the equities tab and right click the stock in question. If it is not there, right click the open area and add it.

Either way you should be in the 'edit' New Investment Wizard. Check or enter the data for this page and click 'next'. Page 2 is where the magic happens. In roughly the middle of the page find "Fraction", with  "1/" prefix to the text box and generally "100" in the text box. THIS is where you set the decimal count! My dividend reinvestment plan creates new shares with up to six decimal places. So, I added enough zeros to make it "100000". Saved that, reopened the particular equity account, then imported (again) the QIF file with the trades and dividends. LO AND BEHOLD (as the saying goes), I now have six digit decimal values, a match for the Quicken account.

I looked through the user stuff and did not see a clean reference the Fraction setting and what is does. To the programmers: I suggest a clean section about this. If I missed it, please send me a note on where to find the information.
Comment 7 Jack 2025-07-07 23:15:28 UTC
Changing status to WORKSFORME instead of just NOTABUG since the docs do not give adequate info on how to prevent or fix.  I'll add this to my notes on editing the Handbook.   However, if you have any concrete suggestions for improving the handbook, feel free to post them to one of the mailing lists or the Discuss forum, and I'll be glad to incorporate into the docbook files.