adrzei Posted November 29, 2017 Report Posted November 29, 2017 Hello, With the last annual financial statement we found some rounding errors in our outgoing invoices (15-20%). Example (negative invoice): Correct calculation: -0,1103 * 1,19 = -0,1313 = -0,13 Example (positive invoice): Correct calculation: 16,18 * 1,19 = 19,2542 = 19,25 How are these values calculated? Blesta Addons and activa 2
Blesta Addons Posted December 5, 2017 Report Posted December 5, 2017 On 11/29/2017 at 8:23 AM, adrzei said: 16,18 * 1,19 = 19,2542 = 19,25 Expand i think this happen with the currency format converter, so 19,2542 it will be 19,25 after a currency format . and the currency fomat is not doing any rounding , is only a decimal extract and return . adrzei 1
adrzei Posted December 5, 2017 Author Report Posted December 5, 2017 On 12/5/2017 at 2:57 PM, Blesta Addons said: i think this happen with the currency format converter, so 19,2542 it will be 19,25 after a currency format . and the currency fomat is not doing any rounding , is only a decimal extract and return . Expand That makes even less sense. If the values are truncated, they should have been correct in my examples. Instead, it was rounded, but wrong.
Blesta Addons Posted December 5, 2017 Report Posted December 5, 2017 On 12/5/2017 at 3:02 PM, adrzei said: That makes even less sense. If the values are truncated, they should have been correct in my examples. Instead, it was rounded, but wrong. Expand so my analysis is wrong, in first i have thinked it worked that way, a fter a small look in the code, i found the function return two value; the "amount" with the real somme and "amount_formated" that is converted and formatted to the currency. and it appear is rounded. adrzei 1
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now