Jump to content

Recommended Posts

Posted

Hello,

With the last annual financial statement we found some rounding errors in our outgoing invoices (15-20%).

Example (negative invoice): 


5a1e6bc29cb0e_2017-11-2909_11_20-Client1507EditInvoice2015-25752_NetCIX.png.314827634c2b5780aff5b84417ab1327.png

 

Correct calculation: -0,1103 * 1,19 = -0,1313 = -0,13

 

Example (positive invoice):

5a1e6e29ac979_2017-11-2909_21_07-Client1554EditInvoice2016-31889_NetCIX.png.713c40037f34a4397f0372e70dac5a85.png

 

Correct calculation: 16,18 * 1,19 = 19,2542 = 19,25

 

How are these values calculated?

Posted
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 .

 

Posted
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.

Posted
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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...