Billmate / opencart

Billmate payment plugin for opencart
BSD 2-Clause "Simplified" License
1 stars 3 forks source link

There are some weird values sent to BO #65

Closed joakim-combain closed 9 years ago

joakim-combain commented 9 years ago

Check apilogsid 66028

The rounding value is very strange and seems to be messing up out pdf calculations.

Boxedsolutions commented 9 years ago

Its a OpenCart Issue, there isnt much we can do, Opencart rounds in a strange way

skarmavbild 2015-08-20 kl 16 45 26
Boxedsolutions commented 9 years ago

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.

joakim-combain commented 9 years ago

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.

Boxedsolutions commented 9 years ago

It is 7,275 "öre"

joakim-combain commented 9 years ago

Is it 7 kr 275 öre or 7275 öre that you are trying to round?

Boxedsolutions commented 9 years ago

It is 7öre and 0,275 öre

joakim-combain commented 9 years ago

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.

Boxedsolutions commented 9 years ago

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.

joakim-combain commented 9 years ago

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?

joakim-combain commented 9 years ago

I've noticed that if you use the discount code 1111, then the pdf in BO gets wrong values.

Boxedsolutions commented 9 years ago

Should be fixed now, please verify with all possible discounts

joakim-combain commented 9 years ago

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

joakim-combain commented 9 years ago

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

Boxedsolutions commented 9 years ago

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.

Boxedsolutions commented 9 years ago

@joakim-combain We could mark it as a known issue until we find a way around.

joakim-combain commented 9 years ago

Ok.

joakim-combain commented 9 years ago

All my issues in this task is fixed. Should I leave this open for the EUR issue?

Boxedsolutions commented 9 years ago

I think we open a new Issue for the EUR rounding Issue

joakim-combain commented 9 years ago

Ok. I'll close this one then.