Bug 492086 - Invisible conversion rate for Bitcoin in price dialog
Summary: Invisible conversion rate for Bitcoin in price dialog
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-23 14:38 UTC by Ralf Habacker
Modified: 2024-08-25 09:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.2
Sentry Crash Report:


Attachments
test case (2.78 KB, text/xml)
2024-08-23 14:38 UTC, Ralf Habacker
Details
Screenshot showing editing bitcoin currency (23.99 KB, image/png)
2024-08-23 14:39 UTC, Ralf Habacker
Details
Screenshot showing after update of conversion rate (24.13 KB, image/png)
2024-08-23 14:39 UTC, Ralf Habacker
Details
Screenshot showing price editor with zero conversion rate (21.12 KB, image/png)
2024-08-23 14:40 UTC, Ralf Habacker
Details
Screenshot showing currency editor for bitcoin with default values (24.70 KB, image/png)
2024-08-24 13:05 UTC, Ralf Habacker
Details
Screenshot showing adding new account for bitcoin using default values (64.81 KB, image/png)
2024-08-24 13:07 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2024-08-23 14:38:26 UTC
Created attachment 172881 [details]
test case

STEPS TO REPRODUCE
1.  start kmymoney from master branch
2.  open appended kmymoney file
3.  Click on menu "Extra" prices
4. Inspect the line containing the price for EUR->BTC

OBSERVED RESULT
There is a conversion rate of 0.0000 shown

EXPECTED RESULT
The conversion rate of 0.000018 should be shown.

SOFTWARE/OS VERSIONS
Linux: openSUSE Leap_15.5
KDE Frameworks Version:  5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
See the appended screenshots for details
Comment 1 Ralf Habacker 2024-08-23 14:39:07 UTC
Created attachment 172882 [details]
Screenshot showing editing bitcoin currency
Comment 2 Ralf Habacker 2024-08-23 14:39:44 UTC
Created attachment 172883 [details]
Screenshot showing after update of conversion rate
Comment 3 Ralf Habacker 2024-08-23 14:40:16 UTC
Created attachment 172884 [details]
Screenshot showing price editor with zero conversion rate
Comment 4 Thomas Baumgart 2024-08-24 06:48:56 UTC
Git commit f596aa45aa750ba5a56b01e7ee14a7893870a7f2 by Thomas Baumgart.
Committed on 24/08/2024 at 06:30.
Pushed by tbaumgart into branch 'master'.

Fix display of price precision
FIXED-IN: 5.2

M  +3    -3    kmymoney/dialogs/kequitypriceupdatedlg.cpp
M  +8    -2    kmymoney/mymoney/storage/pricemodel.cpp

https://invent.kde.org/office/kmymoney/-/commit/f596aa45aa750ba5a56b01e7ee14a7893870a7f2
Comment 5 Ralf Habacker 2024-08-24 13:05:10 UTC
Created attachment 172907 [details]
Screenshot showing currency editor for bitcoin with default values

An additional place for problems with the display of Bitcoin currencies is in the default value for the number of decimal places, which is currently 4 (see screenshot)
Comment 6 Ralf Habacker 2024-08-24 13:07:53 UTC
Created attachment 172908 [details]
Screenshot showing adding new account for bitcoin using default values

It is not possible to add an account with the Bitcoin currency and standard precision, as the conversion factor is always 0.
Comment 7 Thomas Baumgart 2024-08-25 09:44:14 UTC
Edit the bitcoin entry in Tools/Currencies and set the price precision to 8. That increases the value of fractional digits for the price.
Comment 8 Thomas Baumgart 2024-08-25 09:50:47 UTC
Git commit 0b8f7ce918d6c439f1e6148c3f6be4d805783dc2 by Thomas Baumgart.
Committed on 25/08/2024 at 09:50.
Pushed by tbaumgart into branch 'master'.

Increase standard price precision of Bitcoin to 8

This only has an effect if Bitcoins are currently not used in a data
file. In case they are, users can use the currency editor to increase
the price precision manually.

M  +5    -1    kmymoney/mymoney/mymoneyfile.cpp

https://invent.kde.org/office/kmymoney/-/commit/0b8f7ce918d6c439f1e6148c3f6be4d805783dc2