Jump to content
Sign in to follow this  
peterp

Unit price decimal places

Recommended Posts

Hi All,

          I have a situation that I'm not sure how to fix as far as decimal places are concerned in the unit price. I have a quantity special price which includes GST tax and what seems to be happening is that cubecart calculates what the  GST tax is and subtracts this from the original qty pricing price, in this calculation 4 decimal places are used and that is fine however what it then does is displays an round up price to 2 decimal places and uses the rounded up price in calculating the line extension which will give the incorrect extension. For example:

Unit price = $3.44 including GST Tax,  Calculates unit price excluding GST = $3.1273  The displayed unit price rounded up and what is used in the extension is $3.13

Therefore when we do the extension with $3.13 for a qty of 30 we get $93.90

When we do the the extension with $3.1273 for a qty of 30 we get $93.819 which we want to round up to display $93.82 which is the correct extension.

We also want the final total of the order to round up to 2 decimal places as well.

I have search through the forums and have tried changing the decimal places in the currencies but that the shows that number decimal places everywhere which is unacceptable.

With my limited knowledge it would seem that the precision of a price could be defined when it was being used so therefore only using 2 decimals to display the totals but using and displaying 4 decimals when the calculation needs to use 4 decimal places (format and use the unit price as $9.9999)

I hope somebody can help me with this

Best Regards,

Peterp

Share this post


Link to post
Share on other sites

I get your point, but as a customer, if the math doesn't work -- displayed price with qty of 30 should be correct as shown -- I might be suspicious of the whole transaction.

The database has all of the price columns expecting to hold two decimal places.

There would be an incredible amount of work for your solution.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...