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 Quote
Blesta Addons Posted December 5, 2017 Report Posted December 5, 2017 On 29/11/2017 at 8:23 AM, adrzei said: 16,18 * 1,19 = 19,2542 = 19,25 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 Quote
adrzei Posted December 5, 2017 Author Report Posted December 5, 2017 4 minutes ago, 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 . That makes even less sense. If the values are truncated, they should have been correct in my examples. Instead, it was rounded, but wrong. Quote
Blesta Addons Posted December 5, 2017 Report Posted December 5, 2017 8 minutes ago, 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. 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.