+1-888-365-2779
Try Now
More in this section

Forums / Ecommerce / bug: creative tax calculations

bug: creative tax calculations

4 posts, 1 answered
  1. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    22 Jul 2011
    Link to this post
    I have 2 products A & B, both priced at €50, both are checked VAT+Taxes.
    Product A has a rate of 10% and shows price including. Product B has a rate of 10% shows price excluding.
    When placing an order for these products, they get stored differently in the sf_order table inside the db.

    Product B has a tax amount of 5 and a sub_total_display of 50.
    Product A has a tax amount of -7,1054273576010019E-15 and a sub_total_display of 55,000000000000007

    Either someone was creative in avoiding a divide-by-zero on some calculations or there's a perfect explanation that eludes me, but I hope we round numbers to say 3-4 digits or so before storing in the db no?

    I'm sure the IRS won't mind if we didn't specify taxes into 15 digits :)
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    28 Jul 2011
    Link to this post
    Hi Jochem,

    Thank you for reporting this one. I have discussed this with the team and it is going to be resolved for the upcoming official release.

    Best wishes,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    28 Jul 2011
    Link to this post
    Hello Jochem,

    Thanks. We have logged it for fixing. I think the fix will make it in the 4.2 release. 
    Your account has been updated.

    Regards,
    Georgi
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  4. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    28 Jul 2011
    Link to this post
    Hey Radoslav & Georgi,

    Thanks that would be awesome cause it's not only weird but it kinda screws up if you'd do filtering or calculation to see if products had taxes = 0 or discount rates with price > 50 etc :)

    Jochem.
4 posts, 1 answered