crater
crater copied to clipboard
Important: Currencies with 3 digits of precision
I have add a new currency (Bahraini Dinar - BHD) manually from the DB and it has 3 digits precision, formatting looks fine as it shows 3 decimal places but when adding a new invoice the system rounds the last digit. for Ex. if the invoice amount is 12.435 once submitted it becomes 12.430 and it's saved in the DB as 1243.
@Hujairi Hey, It's currently not possible to create invoices with 3 digits of precision. Its DB Structure & everything is designed to work with only 2 digit precision.
I think it'll need a lot more work & testing in order to support more than 2 digits :)
I'll try to see if we can improve this. Meanwhile, if you have any suggestions regarding how to handle this, please feel free to comment.
as far as i see that numbers are being multiplied and divided by 100 for 2 digit currencies, it might help if that number is dynamic as (10 to the power of currency precision) and by that you won't have to change any structure in the DB.
as far as i see that numbers are being multiplied and divided by 100 for 2 digit currencies, it might help if that number is dynamic as (10 to the power of currency precision) and by that you won't have to change any structure in the DB.
Yes, you're right about this. I actually looked more into this after my comment.
We're already using integers for all the currency values. Except for percentages.
Also, we already have a precision
column on the currencies
table, so we can use that to allow 3 digits of precision but need to test further.
any news on currency digits? something we can test?