[Skip to main content](#vessel-content)

#   Price calc with tax

##

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 11 months ago -  13 years 11 months ago [\#77856](#77856) by [JIK](/forum/user/362-jik "View JIK's Profile")  *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#77856 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")* was created by *[JIK](/forum/user/362-jik "View JIK's Profile")*

Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.

When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.

[ ![price-before-apply.jpg](/forum/attachment/7082) ](/forum/attachment/7082 "...fore-apply.jpg")

As soon as I hit "Apply" the prices revert to $364.999998 price with tax and $331.818181818 price before tax.

[ ![price-after-apply.jpg](/forum/attachment/7083) ](/forum/attachment/7083 "...fter-apply.jpg")

This is my currency setting:
[ ![currency-settings.jpg](/forum/attachment/7084) ](/forum/attachment/7084 "...y-settings.jpg")

Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?

Tkx in advance.

- [ ![price-before-apply.jpg](/forum/attachment/7082) ](/forum/attachment/7082 "...fore-apply.jpg") [ ](/forum/attachment/7082?download=1 "...fore-apply.jpg")
- [ ![price-after-apply.jpg](/forum/attachment/7083) ](/forum/attachment/7083 "...fter-apply.jpg") [ ](/forum/attachment/7083?download=1 "...fter-apply.jpg")
- [ ![currency-settings.jpg](/forum/attachment/7084) ](/forum/attachment/7084 "...y-settings.jpg") [ ](/forum/attachment/7084?download=1 "...y-settings.jpg")

Last edit: 13 years 11 months ago by [JIK](/forum/user/362-jik "View JIK's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#77890](#77890) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#77890 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Hi,

The price with tax is re-calculated on apply based on the price without tax. That's why the price with tax change.
Just change the price without tax value to obtain the price of $365.0.. and all the prices displayed will be well rounded.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 11 months ago [\#78040](#78040) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78040 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Hi, thanks for the reply but it does seem that something has changed between v1.5.8 and 2.0 in the way this works. Using your advice, in order to get an exact post tax price of $365.00 I need to enter a pre-tax price calculated to a full 9 decimal places!

In a store using Hikashop version 1.5.8, all I need to do is enter $365.00 into the post tax price and it calculates the pre tax price without changing the post tax price at all.

This is from a store using 1.5.8:
[ ![pic1.jpg](/forum/attachment/7106) ](/forum/attachment/7106 "pic1.jpg")

Okay - but means that now knowing the pre-tax price to it's full decimal value is key to getting the right prices shown. A few Excel worksheets no doubt... But if there is a workaround to what appears to be a rounding problem it would be appreciated.

Thanks.

- [ ![pic1.jpg](/forum/attachment/7106) ](/forum/attachment/7106 "pic1.jpg") [ ](/forum/attachment/7106?download=1 "pic1.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 11 months ago [\#78043](#78043) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78043 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Update... just looking at the file administrator/components/com_hikashop/classes/currency.php (which I had problems with a few years ago) there seem to be some code differences, for example:

in v2.0 this line
$price-&gt;unit_price-&gt;price_value_with_tax=($price-&gt;price_value_with_tax);

in v1.5.8 there is this line..
$price-&gt;unit_price-&gt;price_value_with_tax=round($price-&gt;price_value_with_tax,$rounding);

And other lines in v2 that don't appear to explicit the rounding.

So, is there some setting in v2 where you can tell the system to round?

Telling my admins they have to calculate and enter pre-tax prices to 9 decimals is going to be very painful.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#78065](#78065) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78065 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Hi,

We removed the rounding on prices in HikaShop because it was generated a lot of problem for right price processing.
After that, in the front-end, rounded prices are displayed. But, in the database, right (and precise) prices are stored because otherwise it generates price errors.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 11 months ago [\#78081](#78081) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78081 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Oh. That's a bit of a showstopper for upgrading I think. As I said above "Telling my admins they have to calculate and enter pre-tax prices to 9 decimals is going to be VERY painful." It looks like the problem has been transferred to the user...

Any chance of a better solution in future versions?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#78114](#78114) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78114 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Hi,

We will see if we change that in the future. Actually I suggest you to enter the price with tax like "365.0000022" for the wanted taxed price "365"

The following user(s) said Thank You: [JIK](/forum/user/362-jik "View JIK's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[tony@10uk.net](/forum/user/6276-tony-10uk-net "View tony@10uk.net's Profile")**
- [![tony@10uk.net's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6276-tony-10uk-net "View tony@10uk.net's Profile")
- [ Offline](/forum/user/6276-tony-10uk-net)

Less More

- Posts: 127
- Thank you received: 12
-
-

13 years 11 months ago [\#78136](#78136) by [tony@10uk.net](/forum/user/6276-tony-10uk-net "View tony@10uk.net's Profile")  Replied by *[tony@10uk.net](/forum/user/6276-tony-10uk-net "View tony@10uk.net's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78136 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

This is an interesting conversation. I had not realised this change was part of v2 following some heated messages on this forum.

I actually changed how HS dealt with the calc myself to get around the issues on 1.5.7.

So my question, just upgrading to v2 won't change the DB values to be held to more decimal places I assume. The change only takes place on a price edit.

Is that correct?

Tony

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#78139](#78139) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78139 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Hi,

The product database entries are not modified during the HikaShop update.
Your product prices won't be affected.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 11 months ago [\#78688](#78688) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78688 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Actually, Xavier's solution above does not work. I can enter as many decimals as I like into the pre-tax box to have it correctly calculate the with-tax price, but as soon as I hit Apply the pre-tax price is rounded to 5 decimals resulting in a with-tax price shown to 6 decimals. (Weird but true!)

For example, an item selling at $145 (including 10% tax):

Before save:
Enter pre-tax: $131.81818181818 to calculate $145 with-tax (yes! 11 decimals required!!)

After save:
Pre-tax = $131.81818 and with-tax $144.999998

In fact, where Jerone says that the prices are stored precisely in the database, this is not the case as my pre-tax price is only being stored to 5 decimals. In effect - BOTH prices seem to be now incorrect.

[ ![wrong-price.jpg](/forum/attachment/7184) ](/forum/attachment/7184 "wrong-price.jpg")

I know it seems moot, but I would have thought that a correct price in an online store front and back end would be fundamental. ![:(](/media/kunena/emoticons/22.png ":(")

Can we get back the original rounding fix? Or is there someplace where I can still download v1.59 or v1.6.

- [ ![wrong-price.jpg](/forum/attachment/7184) ](/forum/attachment/7184 "wrong-price.jpg") [ ](/forum/attachment/7184?download=1 "wrong-price.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 11 months ago -  13 years 11 months ago [\#78747](#78747) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78747 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Hi,

This is not a limitation of HikaShop but it is your database.
If you want more precision in HikaShop, you have to modify your table #__hikashop_price and change the type of the column "price_value".
Your actual type should be "decimal(16,5)" and you want "decimal(16,11)" (or "decimal(24,11)" if you want more accuracy for big numbers).

We would not found more precision with HikaShop 1.5.9 or HikaShop 1.6.0

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Last edit: 13 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[JIK](/forum/user/362-jik "View JIK's Profile")**
- [![JIK's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/362-jik "View JIK's Profile") Topic Author
- [ Offline](/forum/user/362-jik)

Less More

- Posts: 209
- Thank you received: 18
-
-

13 years 11 months ago [\#78911](#78911) by [JIK](/forum/user/362-jik "View JIK's Profile")  Replied by *[JIK](/forum/user/362-jik "View JIK's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78911 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Hmmm. I did a brand new install of Hikashop 2.0 and that's how it created the tables. So which currency in the world has more than 2 decimal places?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#78996](#78996) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Price calc with tax](/forum/2-general-talk-about-hikashop/75999-price-calc-with-tax#78996 "Hi, have just upgraded a site to v2 and am getting a weird calculation problem when adding new products.  When I add the price with tax and then click into the price box it correctly calculates the pre-tax price. eg: $365.00 price with tax calculates the price before tax as $331.818181818.  As soon as I hit &quot;Apply&quot; the prices revert to $364.999998 price with tax and $331.818181818 price before tax.  This is my currency setting:  Is there some new setting I need to change somewhere in v2 to keep the price with tax at 2 decimals?  Tkx in advance.")*

Hi,

I don't understand your question.
HikaShop use decimal(16,5) for his prices and because you need more accurate, you should change it.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc1OTk5LXByaWNlLWNhbGMtd2l0aC10YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.123 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
