Comment 5 for bug 980967

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Carlos,

Yes, we got a same problem as per your scenario because of the exchange rate.

First I want to say this is not a bug, but sometimes it's happening with inconsistency due to exchange rate.

Let me explain in detail.
For 2nd scenario You have put a exchange rate = 0.001942 (1/515). Now the calculation is like.

1 CRC = 0.001942 USD
(?) CRC = 1500 USD , So 1500USD = 1500/0.001942 CRC = 772,399.59 CRC. which is the value you got on your 2nd scenario.

As in 1st scenario you got a value 772,500 CRC (1500*515 USD), So the difference is become more than 100CRC due to some decimal values.

You said that "I can't just set the CRC to rate 1 and USD to the according rate (for 515 it would be aprox 0.001942) " but the correct value is (1/515) = 0.001941748. If you put this exchange rate on USD then you will got a correct result on both secnario.

But the problem is we can't give more than 6 digits on decimal point because we have set a digits=(12,6) on rate field. If we have set a digit =(16,10), this is allow to set a 0.001941748 on exchange rate and return the following result on 2nd scenario.
1500/ 0.001941748 = 772499.830050037 which is totally nearest to your result.

So as per my "Opinion" we have to change the digits of rate field on res.currency.rate object like (12,6).

What do your think?

Thanks and waiting for your reply!