- Posts: 235
- Thank you received: 4
Round prices during calculations not working
- janvankuijk
-
Topic Author
- Offline
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6.15
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : Round prices during calculations
Hi,
Allthough I switched on the 'Round prices during calculations'-option and all the prixes are on 5 decimals correct, there is a difference of 1 cent in the calculation.
The problem must be somewhere in the total VAT calculation. I calculate a VAT of € 4,23. The Hikashop € 4,24.
Jan
SEAT SLOT REVISIE SETS: - IBIZA 1997 - 2001 5-delig 338Sp (stiftlengte 46mm)
YESU-0990-SE_2719
Price: € 19,45 Number: 1 Total this product: € 19,45 (ex 21% VAT: € 16.07500)
Subtotal € 19,45
Shipping € 4,95 (ex 21% VAT: € 4.09091)
VAT included € 4,24
TOTAL € 24,41
--
Please Log in or Create an account to join the conversation.
I doubt that the calculations on the taxes are off.
Please provide a screenshot of:
- the settings of that product
- the settings of the "Taxes" area of the HikaShop configuration
- the settings of your tax rule via the menu System>Taxes
so that we can analyze the situation.
Please Log in or Create an account to join the conversation.
- janvankuijk
-
Topic Author
- Offline
- Posts: 235
- Thank you received: 4
Attached the asked settings.
Jan
Please Log in or Create an account to join the conversation.
21% of 16.075 is 3.37575
16.075+3.37575=19.45075
19.45075 rounded is 19.45
21% of 4.09091 is 0.90911
4.09091+0.90911=5.00002
5.00002 rounded is 5
So I already don't arrive at the same shipping fee. Are you sure that you provided the correct numbers ?
I don't see how you can get 4.95 for your shipping with the untaxed prices you provided.
Can you provide a way to reproduce exactly that on your website ? (A test user account, a link to the product page you're using for your test)
Please Log in or Create an account to join the conversation.
- janvankuijk
-
Topic Author
- Offline
- Posts: 235
- Thank you received: 4
Order this product: www.car-and-tuning.nl/shop/product/995-s...revisie-sets?popup=1
Go to the cart and you can see the problem.
Jan
Please Log in or Create an account to join the conversation.
- janvankuijk
-
Topic Author
- Offline
- Posts: 235
- Thank you received: 4
Do you have any idea what the problem can be?
Jan
Please Log in or Create an account to join the conversation.
I've had a fresh look at the issue. It seems that I had made some mistake on the shipping method price calculations due to the lack of information provided about it.
I arrive to this now:
21% of 16.075 is 3.37575
16.075+3.37575=19.45075
19.45075 rounded is 19.45
21% of 4.09091 is 0.85909
4.09091+0.85909=4.9500011
4.9500011 rounded is 4.95
So I get the correct numbers.
And when I sum the taxes after rounding them, I get:
3.38+0.86 = 4.24
So the total amount of taxes seems correct in HikaShop with your example.
Please Log in or Create an account to join the conversation.
- janvankuijk
-
Topic Author
- Offline
- Posts: 235
- Thank you received: 4
You're right. But that is not the problem.
The problem is that the products-amount (€ 19,45) and the shipping amount (€ 4,95) is totalized as € 24,41 instead of € 24,40.
Jan
Please Log in or Create an account to join the conversation.
Well, I reach the correct total:
16.08+4.09+4.24=24.41
It's normal that it uses the rounded values for the total calculation since the "round prices during calculations" setting is turned on.
Please Log in or Create an account to join the conversation.
- janvankuijk
-
Topic Author
- Offline
- Posts: 235
- Thank you received: 4
We switched the 'round prices' on again.
Attached some orders with calculation diferences.
Jan
Please Log in or Create an account to join the conversation.
- janvankuijk
-
Topic Author
- Offline
- Posts: 235
- Thank you received: 4
Unfortunataly the situation still excist.
Will you have a look how to solve this?
Jan
Please Log in or Create an account to join the conversation.
- janvankuijk
-
Topic Author
- Offline
- Posts: 235
- Thank you received: 4
Will you please have a look at this issue?
Jan
Please Log in or Create an account to join the conversation.
Well, I reach the correct total:
16.08+4.09+4.24=24.41
It's normal that it uses the rounded values for the total calculation since the "round prices during calculations" setting is turned on.
And as you can see in the screenshot, your "subtotal" is not what it should.
19.45075 rounded is 19.45 ; there is not possibility that it is rounded 19.46 unless there is something else in your website which can affect the prices.
pasteboard.co/1Zw4g7GF.png
I recommend you to update HikaShop with the latest package and to check your plugins and view overrides.
If you want to provide details about orders ; use screenshots from the backend. Emails are unfortunately, not helpful.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.