Support » Plugin: WooCommerce » Woocommerce incorrectly rounding total price / tax values

  • Resolved impressao3d

    (@impressao3d)


    As we use an automatic tax filling/invoice generator software to create our invoices, we have been noticing quite often a discrepancy between the total values of the software and woocommerce (Always +1 cent or – 1 cent)

    We have set “No, I will enter prices exclusive of tax”
    and “Round tax at subtotal level, instead of rounding per line”

    From examining closer the issue seems to be on woocommerce, this is a real example:

    Product 1: 14,7€
    Product 2: 12.721€
    Shipping: 4,51€

    Total = 31.931€
    w/ tax (0.23%) = 39.27513€

    From what I read in several places, Woocommerce should use 4 decimal numbers of precision on the calculations, which would total to a correct final price rounded to 39,28€.
    This is the value that our invoicing software gives us, however, the woocommerce order was of
    39,27€

    You can see here the mentioned Woocommerce order and our Invoicing software side to side:
    https://i.imgur.com/yPoRygP.png

    The invoicing software takes the prices directly from woocommerce and uses the same values as they are set up with (While woocommerce in the order back end is showing 12.72, the product _regular_price is set to 12.721

    Disabling all plugins aside from Woocommerce does not fix the issue.

    Thank you in advance for the attention and advice.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support mother.of.code

    (@imazed)

    The Mother of Code | Automattic Happiness Engineer

    Hey there!

    Sounds like you’re running into a similar problem as is described here: https://github.com/woocommerce/woocommerce/issues/23835

    In order to check a few things – such as the WooCommerce version you are using – can you start by copy and pasting the system report for this site? You can find it under WP Admin > WooCommerce > Status > Get system report > Copy for support.

    Thanks in advance!

    impressao3d

    (@impressao3d)

    I was trying to understand the fix applied in the topic you sent but I struggled with understanding what was going on.

    Here goes my report:


    ### WordPress Environment ###

    WordPress address (URL): https://staging3.evolt.pt
    Site address (URL): https://staging3.evolt.pt
    WC Version: 3.8.1
    REST API Version: ✔ 1.0.2
    Log Directory Writable: ✔
    WP Version: 5.3.2
    WP Multisite: –
    WP Memory Limit: 768 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: pt_PT
    External object cache: –

    ### Server Environment ###

    Server Info: Apache
    PHP Version: 7.1.33 – Recomendamos que utilize PHP 7.2 ou superior para melhor performance e segurança. Como actualizar a sua versão PHP
    PHP Post Max Size: 128 MB
    PHP Time Limit: 120
    PHP Max Input Vars: 3000
    cURL Version: 7.59.0
    OpenSSL/1.0.2r

    SUHOSIN Installed: –
    MySQL Version: 5.6.40-84.0-log
    Max Upload Size: 128 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔

    ### Database ###

    WC Database Version: 3.8.1
    WC Database Prefix: wpea_
    MaxMind GeoIP Database: ✔
    Tamanho total da base de dados: 167.94MB
    Tamanho dos dados da base de dados: 146.71MB
    Tamanho do índice da base de dados: 21.23MB
    wpea_woocommerce_sessions: Dados: 16.55MB + Índice: 0.27MB + Engine InnoDB
    wpea_woocommerce_api_keys: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_woocommerce_attribute_taxonomies: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_woocommerce_downloadable_product_permissions: Dados: 0.02MB + Índice: 0.06MB + Engine InnoDB
    wpea_woocommerce_order_items: Dados: 0.23MB + Índice: 0.11MB + Engine InnoDB
    wpea_woocommerce_order_itemmeta: Dados: 1.52MB + Índice: 3.03MB + Engine InnoDB
    wpea_woocommerce_tax_rates: Dados: 0.02MB + Índice: 0.06MB + Engine InnoDB
    wpea_woocommerce_tax_rate_locations: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_woocommerce_shipping_zones: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_woocommerce_shipping_zone_locations: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_woocommerce_shipping_zone_methods: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_woocommerce_payment_tokens: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_woocommerce_payment_tokenmeta: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_woocommerce_log: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_commentmeta: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_comments: Dados: 1.52MB + Índice: 0.59MB + Engine InnoDB
    wpea_csshero4: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_ct_ugdpr_consent_log: Dados: 0.16MB + Índice: 0.00MB + Engine InnoDB
    wpea_followup_coupons: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_followup_coupon_logs: Dados: 0.02MB + Índice: 0.05MB + Engine InnoDB
    wpea_followup_customers: Dados: 0.06MB + Índice: 0.06MB + Engine InnoDB
    wpea_followup_customer_carts: Dados: 0.30MB + Índice: 0.03MB + Engine InnoDB
    wpea_followup_customer_notes: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_followup_customer_orders: Dados: 0.06MB + Índice: 0.02MB + Engine InnoDB
    wpea_followup_email_excludes: Dados: 0.02MB + Índice: 0.05MB + Engine InnoDB
    wpea_followup_email_logs: Dados: 0.08MB + Índice: 0.05MB + Engine InnoDB
    wpea_followup_email_orders: Dados: 0.41MB + Índice: 0.13MB + Engine InnoDB
    wpea_followup_email_tracking: Dados: 0.06MB + Índice: 0.08MB + Engine InnoDB
    wpea_followup_followup_history: Dados: 1.52MB + Índice: 0.05MB + Engine InnoDB
    wpea_followup_order_categories: Dados: 0.16MB + Índice: 0.20MB + Engine InnoDB
    wpea_followup_order_items: Dados: 0.09MB + Índice: 0.19MB + Engine InnoDB
    wpea_followup_subscribers: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_followup_subscribers_to_lists: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_followup_subscriber_lists: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_links: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_omega_index_changes: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_omega_index_status: Dados: 16.52MB + Índice: 0.00MB + Engine InnoDB
    wpea_options: Dados: 4.52MB + Índice: 0.16MB + Engine InnoDB
    wpea_pmxe_exports: Dados: 0.05MB + Índice: 0.00MB + Engine InnoDB
    wpea_pmxe_google_cats: Dados: 0.39MB + Índice: 0.00MB + Engine InnoDB
    wpea_pmxe_posts: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_pmxe_templates: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_pmxi_files: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_pmxi_history: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_pmxi_images: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_pmxi_imports: Dados: 0.05MB + Índice: 0.00MB + Engine InnoDB
    wpea_pmxi_posts: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_pmxi_templates: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_postmeta: Dados: 29.52MB + Índice: 11.03MB + Engine InnoDB
    wpea_posts: Dados: 10.52MB + Índice: 0.95MB + Engine InnoDB
    wpea_ps_exclude: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_ps_posts: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_ps_product_sku: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_termmeta: Dados: 0.08MB + Índice: 0.13MB + Engine InnoDB
    wpea_terms: Dados: 0.08MB + Índice: 0.09MB + Engine InnoDB
    wpea_term_relationships: Dados: 0.36MB + Índice: 0.31MB + Engine InnoDB
    wpea_term_taxonomy: Dados: 0.09MB + Índice: 0.11MB + Engine InnoDB
    wpea_usermeta: Dados: 1.52MB + Índice: 2.02MB + Engine InnoDB
    wpea_users: Dados: 0.08MB + Índice: 0.05MB + Engine InnoDB
    wpea_wcpdf_invoice_number: Dados: 0.00MB + Índice: 0.00MB + Engine MyISAM
    wpea_wc_admin_notes: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wc_admin_note_actions: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_wc_customer_lookup: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_wc_download_log: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_wc_order_coupon_lookup: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_wc_order_product_lookup: Dados: 0.02MB + Índice: 0.06MB + Engine InnoDB
    wpea_wc_order_stats: Dados: 0.02MB + Índice: 0.05MB + Engine InnoDB
    wpea_wc_order_tax_lookup: Dados: 0.02MB + Índice: 0.03MB + Engine InnoDB
    wpea_wc_product_meta_lookup: Dados: 0.06MB + Índice: 0.09MB + Engine InnoDB
    wpea_wc_tax_rate_classes: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_wc_webhooks: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_wfblockediplog: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wfblocks7: Dados: 0.02MB + Índice: 0.05MB + Engine InnoDB
    wpea_wfconfig: Dados: 0.44MB + Índice: 0.00MB + Engine InnoDB
    wpea_wfcrawlers: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wffilechanges: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wffilemods: Dados: 2.52MB + Índice: 0.00MB + Engine InnoDB
    wpea_wfhits: Dados: 0.09MB + Índice: 0.05MB + Engine InnoDB
    wpea_wfhoover: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_wfissues: Dados: 0.02MB + Índice: 0.06MB + Engine InnoDB
    wpea_wfknownfilelist: Dados: 1.52MB + Índice: 0.00MB + Engine InnoDB
    wpea_wflivetraffichuman: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_wflocs: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wflogins: Dados: 0.06MB + Índice: 0.03MB + Engine InnoDB
    wpea_wfls_2fa_secrets: Dados: 0.02MB + Índice: 0.02MB + Engine InnoDB
    wpea_wfls_settings: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wfnotifications: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wfpendingissues: Dados: 0.02MB + Índice: 0.06MB + Engine InnoDB
    wpea_wfreversecache: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wfsnipcache: Dados: 0.02MB + Índice: 0.05MB + Engine InnoDB
    wpea_wfstatus: Dados: 0.13MB + Índice: 0.09MB + Engine InnoDB
    wpea_wftrafficrates: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wpfm_backup: Dados: 0.02MB + Índice: 0.00MB + Engine InnoDB
    wpea_wpml_mails: Dados: 54.04MB + Índice: 0.03MB + Engine MyISAM
    wpea_yoast_seo_links: Dados: 0.05MB + Índice: 0.02MB + Engine InnoDB
    wpea_yoast_seo_meta: Dados: 0.14MB + Índice: 0.00MB + Engine InnoDB

    ### Security ###

    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔

    ### Active Plugins (20) ###

    Advanced Custom Fields: por Elliot Condon – 5.8.7
    AnyWhere Elementor Pro: por WP Vibes – 2.13
    DynamicConditions: por RTO GmbH – 1.4.1
    Elementor Pro: por Elementor.com – 2.7.3
    Elementor: por Elementor.com – 2.8.2
    JetMenu: por Crocoblock – 1.5.15
    Moloni: por Moloni.com – 3.0.18
    Multibanco, MBWAY e Payshop (IfthenPay) para WooCommerce: por Webdados – 4.0.8
    NIF (Num. de Contribuinte Português) para WooCommerce: por Webdados – 4.2.3
    Ocean Extra: por OceanWP – 1.5.19
    Octolooks Scrapes: por Octolooks – 2.0.1
    Omega Instant Search For WooCommerce: por Omega Search – 2.0.8 – Não testado com a versão activa do WooCommerce
    Rede Chronopost Pickup em Portugal para WooCommerce: por Webdados – 1.6.5
    Rede VASP Expresso Kios em Portugal para WooCommerce: por Webdados – 1.6.5
    Advanced Messages for WooCommerce: por Jeroen Sormani – 1.3.4 – Não testado com a versão activa do WooCommerce
    WooCommerce Advanced Shipping: por Jeroen Sormani – 1.0.14 – Não testado com a versão activa do WooCommerce
    WooCommerce Extra Shipping Options: por Jeroen Sormani – 1.2.3 – Não testado com a versão activa do WooCommerce
    WooCommerce: por Automattic – 3.8.1
    WP Mail Logging: por MailPoet – 1.9.5
    XforWooCommerce: por 7VX LLC
    USA CA – 1.1.1 – Não testado com a versão activa do WooCommerce

    ### Inactive Plugins (1) ###

    Google Analytics Dashboard for WP (GADWP): por ExactMetrics – 5.3.10

    ### Settings ###

    API Enabled: –
    Force SSL: –
    Currency: EUR (€)
    Currency Position: right_space
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)

    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)

    Connected to WooCommerce.com: –

    ### WC Pages ###

    Página da Loja: #204 – /shop/
    Carrinho: #205 – /cart/
    Finalizar compras: #206 – /checkout/
    Minha conta: #207 – /my-account/
    Termos e condições: #2429 – /termos-e-condicoes/

    ### Theme ###

    Name: Evolt v3.0
    Version: 3.2.3
    Author URL: https://propulsor.pt/
    Child Theme: ✔
    Parent Theme Name: OceanWP
    Parent Theme Version: 1.7.1 – 1.7.3 está disponível
    Parent Theme Author URL: https://oceanwp.org/about-me/
    WooCommerce Support: ✔

    ### Templates ###

    Overrides: oceanwp/woocommerce/cart/mini-cart.php
    oceanwp-child/woocommerce/checkout/terms.php
    oceanwp/woocommerce/content-single-product.php
    oceanwp-child/woocommerce/emails/admin-new-order.php versão 2.5.0 está desactualizado. A versão actual é 3.7.0
    oceanwp-child/woocommerce/emails/customer-completed-order.php versão – está desactualizado. A versão actual é 3.7.0
    oceanwp/woocommerce/loop/loop-start.php
    oceanwp/woocommerce/single-product/title.php

    Outdated Templates: ❌

    Saiba como actualizar

    ### Action Scheduler ###

    Complete: 209
    Oldest: 2019-11-19 11:14:58 +0000
    Newest: 2019-12-20 00:00:09 +0000

    Pending: 7
    Oldest: 2019-12-20 13:54:43 +0000
    Newest: 2019-12-23 11:53:09 +0000

    Canceled: 0
    Oldest: –
    Newest: –

    In-progress: 0
    Oldest: –
    Newest: –

    Failed: 0
    Oldest: –
    Newest: –

    `

    Hey there guys, any update?

    Plugin Support Shaun Kuschel

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @impressao3d – Sorry for the delay in getting back to you.

    The Github issue linked above looks like it was for a different bug that was fixed in 3.7.

    This open issue sounds like what you are describing:

    https://github.com/woocommerce/woocommerce/issues/24184

    I would recommend reading through that discussion and subscribing to the issue to see when a fix is added. Cheers!

    Plugin Support Austin M

    (@apmwebdev)

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

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