Rounding issues in v5

Hi,

After I was able to update to v5 a few weeks ago, I have been enjoying the new version and I like very much all the improvements you have added to the new version.

With the ability to import a default chart of accounts for every country, I could setup my COA for Spain, and with the fantastic Report Creator I could customize my invoices to what I wanted, and start creating my own invoices.

Now, I am starting to add received invoices and purchase receipts, and I find again what I believe is the weakest point of this wonderful piece of software: the rounding of decimals.

Probably with my own invoices is the same, but I have not checked, but whenever I try to input another company’s invoice into ERPNext, I have a hard time to make the numbers coincide, and with the help of a calculator I find that the problem is nearly all the time on ERPNExt’s side.

Please, consider the screen capture below:

If you multiply 5 x 1,0743 = 5,3715
5,3715x0,85=4,566

And the same:
1,0743x0,85=0,913
5x0,913=4,566

In any case the result of that operation is 0,9100 and 4,55, as you can see in the screenshot.

Am I doing something wrong? I have been playing with the currency/float and precision, but I always get same result.

Many thanks in advance for your kind attention on this, and kind regards from Spain

Also, why is the decimal separator for price list and rate the “.”, and for discount and amount the “,”??

Well, I flushed the cache, and it seems that the calculation improved after setting rate and amount to float with 4 decimal places.

Regards,

I have tried to replicate with same data in my local, but could not. Here is my local screenshot:

I have set precision of fields “price_list_rate, discount_percentage, rate, amount” as 4, remained fieldtype same as default.