MrBaseball34 Posted July 29, 2010 Share Posted July 29, 2010 Product is a downloadable product. Price is $9.99Why would Total (tax excl) be $9.98 on the PDF invoice? Total products (tax excl.) : $9.99 Total products (tax incl.) : $10.81 Total (tax excl.) : $9.98 Total (tax incl.) : $10.81 Where would I look that up? Link to comment Share on other sites More sharing options...
repair-my-pc-online Posted July 29, 2010 Share Posted July 29, 2010 will be todo with rounding.Look at preferences in your back office and you can select the different types of rounding. either superior, inferior or classical. Unfortunately rounding of numbers has always been problematic and needs careful consideration in software development. If its any consolation the financial industry probably spends millions every year on this very same problem when testing and implementing bespoke software, and many a developer has cursed the outcomes of rounding up and down on decimal places. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 29, 2010 Author Share Posted July 29, 2010 It just really looks bad to customers, regardless of the reasons.so what's the difference? They have no explanations: You can choose the rounding of prices, rounding always superior, inferior or classical rounding. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 29, 2010 Author Share Posted July 29, 2010 BTW, I'm using PS v1.3.1.1With superior rounding: Total products (tax excl.) : $10.00 Total products (tax incl.) : $10.82 Total (tax excl.) : $9.99 Total (tax incl.) : $10.82 With classical rounding: Total products (tax excl.) : $9.99 Total products (tax incl.) : $10.81 Total (tax excl.) : $9.98 Total (tax incl.) : $10.81 With inferior rounding: Total products (tax excl.) : $9.98 Total products (tax incl.) : $10.81 Total (tax excl.) : $9.98 Total (tax incl.) : $10.81 I just don't see how it can be so difficult to get this correct when there is only ONE product in the cart.I can understand if there are many items in the cart but not when there is only one and the price is 9.99000. It should not round at all if there is only one item in the cart, for sure.I also don't see how it can get two different totals with either superior or classical if there is only one item. The "Total products (tax excl.)" should be the EXACT same as "Total (tax excl.)"While inferior rounding produces the same values, it does NOT reflect the actual price of the product.I see this as a BUG... Link to comment Share on other sites More sharing options...
repair-my-pc-online Posted July 29, 2010 Share Posted July 29, 2010 it is a bug.Personally not delved much into the actual code of pretashop. But going by your initial testing my first assumption would be that the rounding of the variables are not standardized. i.e. looks like calculations and rounding from including tax price whereas elswhere in code it rounding from excluding taxPS the below is all purely speculation as i have not looked closely at undelying code and only based on experience for normal reasons this happens.eg looking at your prices and tax the tax rate is 8.25% so 9.99 +8.25% tax = 10.814175 so rounding depending where it down will be different when working out total excluding tax depending how it is done. eg working out price before tax will work out different from 10.814175 than would with 10.81. These should be done as too seperate calculations from the initial pre-tax prices but im assuming they are all worked out from the initial rounded up and down figure totals then rounding conducted again on them.As said in previous post though finding the right balance so works out perfect 100% of the time is a developers nightmare are times Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 29, 2010 Author Share Posted July 29, 2010 It is my understanding that the Tools:displayPrice() function is what is being used. If they are feeding in an already rounded price to that, it will be rounded again.Me thinks that they should always use raw amounts for calculations, including calculating the totals to 6 decimal places like it is set in the shop, and round only for display. It looks like they may be doing something different. Link to comment Share on other sites More sharing options...
deech123 Posted October 15, 2013 Share Posted October 15, 2013 is there anybody who solved this problem? since for me it's also a big problem with the tax control people over here due to the differences. Link to comment Share on other sites More sharing options...
Recommended Posts