Hi I am using CiviCrm 5 on wordpress,
donation amounts displayed with zeros floating points after the decimal for example 25.00000000 instead of 25
Is there any solution?
Hi I am using CiviCrm 5 on wordpress,
donation amounts displayed with zeros floating points after the decimal for example 25.00000000 instead of 25
Is there any solution?
Short answer: I've prepared a patch that I'd love for someone to test to fix this.
Longer answer: In recent months, CiviCRM has implemented support for currencies with more than two digits after the decimal point. This is important both for cryptocurrencies as well as certain countries' tax calculations. The decision was, "Store all currencies in the database with nine significant digits, and when displaying them, format them according to the rules of that currency."
This all happened in CiviCRM core and it went so well that end users who didn't need the greater accuracy didn't notice. Unfortunately, no one updated Simple Donate.
I don't use Simple Donate, but recently handled a similar problem in my custom code, so I looked and it was a 4 line fix.
I'd love for someone affected by this problem to test my patched version and report back if you have any problems with it. If there are no issues, I'll submit the patch to the original authors. I'd especially love feedback from users who don't use US dollars as their currency!
Find the fix on my Github repo or download directly. When unzipping, please be sure to rename the folder to match your old extension folder name that you're replacing.