AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Nuno Neff on May 16, 2021, 05:40:40 PM

Title: Tax issue
Post by: Nuno Neff on May 16, 2021, 05:40:40 PM
Hi guys, in my country my tax class is 23% and im having an issue with this.

The price is ok in photo 1 but when i click on the product and enter the next page shows me wrong price, instead of 11,95€ it shows 11,96€ ???

How can i solve this problem?
Title: Re: Tax issue
Post by: Basara on May 17, 2021, 01:17:11 AM
Hello.
What is your base currency and post here the exact value of the price you set in the admin
Title: Re: Tax issue
Post by: Nuno Neff on May 17, 2021, 03:49:39 AM
Hello Basara my base currency is € and the value set in admin is 1.00000000
Title: Re: Tax issue
Post by: abolabo on May 17, 2021, 04:27:09 AM
can you check what value of price in the database table "your-prefix_products" for this product_id ?
Title: Re: Tax issue
Post by: Nuno Neff on May 17, 2021, 04:40:42 AM
Hi abolado the tax id is 3 and its correct, corresponds to my tax class id that is 23%

This must be a bug, please test it if you add € currency and add a 23% tax class and add a product with 11,95 tax incl.

And then when you enter the product page you will see that it shows wrong price, it will show 11,96€
Title: Re: Tax issue
Post by: abolabo on May 17, 2021, 04:46:14 AM
please give us more details

i mean product price without any taxes (as i asked before, you can see it inside product table)

You show for us result of price calculation and to test we need to replicate this bug on our side.
But how to replicate when we don't know "source" price ?
Title: Re: Tax issue
Post by: Nuno Neff on May 17, 2021, 05:17:13 AM
you're right, i forgot to tell you the base price, its 9,715€
Title: Re: Tax issue
Post by: abolabo on May 17, 2021, 10:46:53 AM
you're right, i forgot to tell you the base price, its 9,715€

Why do you have 3 digits after comma for euro?
Title: Re: Tax issue
Post by: llegrand on May 17, 2021, 12:06:38 PM
just some FYI about currency formatting around the world.

https://www.dfa.cornell.edu/treasurer/cash-management/processinginternational/intl-currency

Most European countries (as well many other countries in the world):
300.000 or 300 000 means three hundred thousand
€120.000,99 or €120 000,99 means one hundred twenty thousand euros and ninety-nine cents

The UK (plus other countries in the world, like the US, Australia, and New Zealand):
300,000 means three hundred thousand
€120,000.99 means one hundred twenty thousand euros and ninety-nine cents

SI System:
300 000 means three hundred thousand
€120 000,99 or €120 000.99 means one hundred twenty thousand euros and ninety-nine cents

Title: Re: Tax issue
Post by: Nuno Neff on May 17, 2021, 12:09:46 PM
Let me explain,  my final price of that product is 11,95€

So if i do 11,95 ÷ 1,23 % = 9.715€   <-- This is the correct formula

If i do 9.71€ + 23% it will give me 11,94€    (if i use 2 decimal numbers it will give me this price)

If i do 9,72 + 23% it will give me 11,96€, do you understand?   

I came from opencart and it worked and already tested Prestashop and its also works.

So theres something wrong here.  Why does it show the right price in my first photo and then when you enter the product and also in fastcheckout it shows 11,96€.
Title: Re: Tax issue
Post by: abolabo on May 18, 2021, 12:18:46 PM
Let me explain,  my final price of that product is 11,95€

So if i do 11,95 ÷ 1,23 % = 9.715€   <-- This is the correct formula

If i do 9.71€ + 23% it will give me 11,94€    (if i use 2 decimal numbers it will give me this price)

If i do 9,72 + 23% it will give me 11,96€, do you understand?   

I came from opencart and it worked and already tested Prestashop and its also works.

So theres something wrong here.  Why does it show the right price in my first photo and then when you enter the product and also in fastcheckout it shows 11,96€.

can you check fix from this commit (https://github.com/abantecart/abantecart-src/commit/a92bda657d6f1e4f62b1d7cc1f78230dbeca66d7)  ?

Just replace your files with changed
Title: Re: Tax issue
Post by: Nuno Neff on May 18, 2021, 05:15:28 PM
I replaced my 2 files with the those 2 and its working

THANK YOU VERY MUCH  :) :D