Bug 452697

Summary: It is not possible to enter a currency rate lower than 0.01
Product: [Applications] skrooge Reporter: alex.viv
Component: generalAssignee: Guillaume DE BURE <guillaume.debure>
Status: RESOLVED NOT A BUG    
Severity: normal CC: stephane
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Example

Description alex.viv 2022-04-17 10:27:51 UTC
SUMMARY
***
If you work with currencies with very low value, like IDR, and your main currency is EUR, you can't set the conversion rate in the system as it accepts only 2 decimals.
In the IDR case: EUR/IDR = 15 533 but if you have to input IDR/EUR, you need to input 0,000064
***


STEPS TO REPRODUCE
1. Create primary currency as EUR
2. Create another currency as IDR
3. Try to add value of EUR for 1 IDR = 0,000064

OBSERVED RESULT
If you input 0,000064, it will be rounded to 0.00 which is wrong

EXPECTED RESULT
The system should be able to accept currency with a lot of decimals to cater for currencies with very low values

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: xubuntu 20.04
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

Skrooge version: 2.27.0

ADDITIONAL INFORMATION
Comment 1 Stephane MANKOWSKI 2022-04-17 17:27:09 UTC
Hi,
In unit page, you can choose the number of decimals for the created unit.
So, you can modify the unit to set the number of decimals you want.
Comment 2 alex.viv 2022-04-19 14:18:37 UTC
Hi Stephane,

I tried your solution. As a temporary workaround it works, but this should still be considered as a bug.

The number of decimal is to control the display and the input, but exchange rate is something totally independant.
See how it looks now after I updated to 6 digits vs 2 digits. The correct one is with 2 digits.
https://i.ibb.co/JkF2CrB/image.png

Let me know if this clarifies the problem and if we can put it back as a bug.

Actually I just realize that this applies to all currency. Example look at EUR/USD exchange rate. By default yahoo shows 4 decimals but basically this confirms that there should be no limitation in decimals when you input exchange rate.
https://finance.yahoo.com/quote/EURUSD=X/
Comment 3 Stephane MANKOWSKI 2022-04-19 20:26:08 UTC
Created attachment 148259 [details]
Example

As you can see in the attached file. 
The number of digit are used for display.
The entered value is really used even if displayed with less digits (go in operation page to see).
Comment 4 alex.viv 2022-04-20 14:17:52 UTC
You are right, since when I originally entered 0.000065, it was showing 0.00, I never realized it was still saving the value 0.000065.
So what I described is not a bug. 

But shouldn't we raise a bug for the display of exchange rate?
If I enter 0.000065, it should display 0.000065 no matter what is the number of decimal. Isn't that correct?