Multiple decimals for Euro, necessary to show them in backend?

  • Posts: 190
  • Thank you received: 9
  • Hikashop Multisite
2 months 1 week ago #334196

I understand for some currencies you need more than 2 decimals.
But in Euro's i have never seen this in any tool before in an other tool then Hikashop (and i Maintain 100 site's).
My client notes that there was 1 cent difference in the total price.
So i was checkingout and get quite frustrated with the pricing and decimals.

So i want 27,95 inclusive tax
www.dropbox.com/s/6ogubg96dvacj6q/Scherm...%2011.38.24.png?dl=0

It calculates:
www.dropbox.com/s/omxkeg7gjxv3ilg/Scherm...%2011.38.36.png?dl=0

The result is:
www.dropbox.com/s/5ab6hm6dtgo72ak/Scherm...%2011.38.45.png?dl=0

In the euro settings i have set 2 decimals.
And yes i see 2 but even as frontend webdeveloper I am quite frustrated that it is difficult to always have the price i want.
Because sometimes it is 27.9500004 or 27.949998
Why is this and is this possible to just remove the extra decimals?

Thanks for your support!

Please Log in or Create an account to join the conversation.

  • Posts: 73703
  • Thank you received: 11298
  • MODERATOR
2 months 1 week ago #334206

Hi,

The extra decimals are necessary in the backend because sometimes you need more than two decimals to configure the price in the backend to get the exact result you want in the frontend when taxes are added.
Even in your example, you need HikaShop to support more than 2 decimals to be able to store 13.7155 in the database so that it can calculate 14.95 when applying the tax. (note that your screenshots do not correspond to the prices you've written about in your message)

It's also necessary for some products where more than 2 decimals are needed.
For example, you'll often see the price of gasoline with 3 decimals, or the kwh price (for electricity).

However, normally, on the frontend you should only see the rounded price with the correct value, isn't it ?

Note that in the past, we had a plugin called "tax override plugin" which could produce strange rounding results. That plugin has been removed from HikaShop but if you still have it and it is enabled, that might explain why you're struggling with the tax calculations and the rounding.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum