• jaak69

    (@jaak69)


    Hello,

    I’ve run into rounding problems (prices come to shop as they are in ERP).

      Prices are displayed 2 digits after decimal

    Example. Price without tax is 9,825. VAT rate is 20%. Then calculating with table calculator I get correct result 11.79. But WooCommerce is calculating 11.80. When I reduce the price from 9.825 -> 9.824 the result is 11.78.

    Woocommerce is rounding in step 0.02. How can I get precision 0.01?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    You can change the number of decimals that are displayed to force the calculation to stop rounding up to two decimals.

    That can be changed from WooCommerce > Settings > General > Currency options > Number of decimals. Since your price is set up with three decimals, I’d recommend selecting 3 decimals in that setting.

    Thread Starter jaak69

    (@jaak69)

    Hello,

    I’ve tried that. But in the shop frontend, three decimals look quite weird and because the pricing data coming from the ERP is not fixed to three decimal places (in ERP the users are entering prices with VAT and for API connection ERP calculates prices without VAT). Therefore is there are more options on how the rounding will work correctly?

    • This reply was modified 5 years ago by jaak69.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rounding problems’ is closed to new replies.