Support » Plugin: WooCommerce » Subtotal Calculation Incorrect

  • Resolved AlexHolsgrove

    (@alexholsgrove)


    We have recently discovered an issue with rounding on the order checkout complete, and customer email. The basket shows the correct subtotal for products, however when an order is placed the subtotal is different – I presume a rounding issue with the tax.

    [url=https://ibb.co/f24sGpm][img]https://i.ibb.co/Btq9KZ8/Rounding.png[/img][/url]
    https://ibb.co/f24sGpm

    We have added products to the site inclusive of VAT (UK 20%) and the checkbox to “Round tax at subtotal level, instead of rounding per line” is unticked. If I change this to be ticked, the basket subtotal and total are £0.01 more. The checkout and customer email subtotals are then correct, but both totals are also £0.01 more than they should be.

    Tax is entered to 4 decimal places – 20.0000% (Admin -> WooCommerce -> Settings -> Tax)

    I am testing with the twentynineteen theme to eliminate our theme being the problem.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Just as a test, we also upgraded from WooCommerce 3.6.4 (which I should have mentioned) to 3.7 and this is still un-resolved.

    Plugin Support RK

    (@riaanknoetze)

    Hi there,

    Just to check:

    Tax is entered to 4 decimal places

    Are you seeing the same issue when lowering that to 2 decimal places? In my experience tax rounding is almost always a case of excessive decimal places being used.

    I can’t set the tax to less than 4 decimal places as the admin automatically changes 20.00 to 20.0000. I have instead updated this value in the “wp_woocommerce_tax_rates” table of the database, but this doesn’t seem to help. The total should be £958.00, but displays as £957.99 on the checkout confirmation page.

    Is there anything I can do to resolve this, either by changing settings or adjusting something in the database?

    Plugin Support Andrew

    (@slash1andy)

    Automattic Happiness Engineer

    Can you change the decimal places in the “Currency” settings at the end of the “General” WooCommerce settings page? That will allow you to set the tax rate to 2 decimal places.

    On both the live site (WC 3.6.4) and my local development (WC 3.7.0) both have the currency set to 2 decimal places, but still the tax requires 4 decimals (else it automatically adds the extra places).

    As a sidenote, where is the best place to raise bugs – here or on the WooCommerce GitHub?

    Plugin Support Jesse Pearson

    (@jessepearson)

    Automattic Happiness Engineer

    @alexholsgrove Was this resolved with WooCommerce 3.7.1, or is it still an issue?

    As for reporting bugs, if the issue is able to be replicated, then you can create the bug report at GitHub: https://github.com/woocommerce/woocommerce/issues

    Plugin Support Con Schneider

    (@conschneider)

    Automattic Happiness Engineer

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Kind regards,

    I have opened an issue on GitHub here: https://github.com/woocommerce/woocommerce/issues/24540

    So this support topic can be closed rather than duplicating things.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.