Closed joakim-combain closed 9 years ago
Its a OpenCart Issue, there isnt much we can do, Opencart rounds in a strange way
Really close on this, but its something strange with rounding and EUR in the API. apiLogsid 66353
invoice number 8046. The rounding is sent as 7,28 with a lot of decimals. But it equivalent with sending 728 with SEK.
You should send in all values in öre. Maybe that's the issue? Our api only calculates what is sent in and for some reason this is what has been sent in "rounding":7.2759576141834e-12.
It is 7,275 "öre"
Is it 7 kr 275 öre or 7275 öre that you are trying to round?
It is 7öre and 0,275 öre
Why would you round twice? Wouldn't it help to just round 0,975? I'm not sure that I'm fully understanding the issue.
if I send in 7,275.... with currency EUR as rounding., It becomes 7,275 Euro not 7,275 cents.
But with SEK it is correct, test and se and you will see the strange thing, the total shows correct in the grid but not when the invoice is opened.
Aha, ok.
I changed currency counting in the 2.0 store. The euro converter was set to wrong value.
Now if you check invoice 8059 and order 94 in the store, it looks like the discount code is doing something weird when being sent in and some of the value is put in rounding. It's only differing with 1 öre, but it's still wrong. Maybe this will help solving the issue?
I've noticed that if you use the discount code 1111, then the pdf in BO gets wrong values.
Should be fixed now, please verify with all possible discounts
When I use 3333 (free shipping) we put 12% and 25% vat discounts as 0. Can we stop it from doing that when the discount isn't based on the products? Or is there a reason for this? See invoice # 741410
Confirmed in 1.5.4
I changed to EUR as currency and chose to use card. When I get to payment window we show decimals, which was not shown in the checkout. We should always show the same amount in payment window as in checkout.
I used: Sony VAIO, iPhone åäö, åäö as discount code and per item shipping rate.
Confirmed in 1.5.4
It the customer has Euro and Decimal places 0, it would be better to use Myoc Price Rounding. As OpenCart calculates in a very crazy way.
I have Tried to implement it with opencart settings for Currency decimal places, but it didnt calculate well that way either.
@joakim-combain We could mark it as a known issue until we find a way around.
Ok.
All my issues in this task is fixed. Should I leave this open for the EUR issue?
I think we open a new Issue for the EUR rounding Issue
Ok. I'll close this one then.
Check apilogsid 66028
The rounding value is very strange and seems to be messing up out pdf calculations.