Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping module: weirs tax calculation


timo.heil

Recommended Posts

As I would like to have a shipping amount of 4.95 including tax, I entered a net amount of 4.2672413 in the shipping module's admin area (based on a 16.0% tax rate). When I checkout, the shipping rate is displayed as 4.95, which is OK.

 

Nevertheless, when I have a look at the orders_total table in the database, the value is 4.947241. Of course this value will not be exactly 4.95, but I cannot see how OSC comes to a value of 4.947241???

 

See:

 

4.2 * 1.16 = 4.872

4.26 * 1.16 = 4.9416

4.267 * 1.16 = 4.94972

4.2672 * 1.16 = 4.949952

 

How does OSC add the tax? As you can see, even with a limited amount of decimal digits, the 4.947... - especially the '7' doesn't make sense!

 

MAybe someone can help? I'm asking this because I'm afraid that this '7' (which should be a '9') sometimes leads to a rounding error when the total tax is calculated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...