Rounding errors
-
We’ve just found very small rounding errors. That’s weird since all single numbers seem to be correct.
See this screenshot, please:
The total sum should be 38,60 and not 38,61.
36,05 – 3,61 (discount) = 32,44 EUR
32,44 / 100 + 19 = 6,16 EUR tax
32,44 + 6,16 = 38,60Any ideas, what’s going on?
We use the latest WP and Woocommerce. All plugins are the latest versions.
- This topic was modified 9 months, 2 weeks ago by cutu234.
-
Hey there, @cutu234! Thanks for contacting us. I’m happy to help you.
Let me ask some questions so we can investigate this further.
- Is this the only order that had this issue or did it happen to other orders too?
- In case it happened to other orders, do you find any similarities between them? It can be same products, same payment method, similar address, similar prices, etc
- On your screenshot you added a 3,60 below the discount. Do you mean that the discount was calculated incorrectly too?
- Can you please share a screenshot of what you see on WooCommerce > Settings > General > Currency options
Furthermore, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:
System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.Looking forward to your reply.
Have a wonderful day!
Hi there,
thank you very much for the fast reply. Very much appreciated!This problem seems to happen to all orders with the exception of the following payment methods that seem to work perfectly fine: invoice, bank transfer.
On your screenshot you added a 3,60 below the discount. Do you mean that the discount was calculated incorrectly too?
No, these are just some personal notes that doesn’t matter here.
Here’s the screenshot of the currency options:
We see some critical errors due to not enough PHP memory. We can’t really do anything about it, since the site runs on the maximum value of 512M. Have no idea why this would not be enough.
Here’s the status report:
### WordPress Environment ### WordPress address (URL): https://www.domain.de Site address (URL): https://www.domain.de WC Version: 8.5.2 REST API Version: ? 8.5.2 WC Blocks Version: ? 11.8.0-dev Action Scheduler Version: ? 3.7.1 Log Directory Writable: ? WP Version: 6.4.3 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ? Language: de_DE_formal External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 8.1.26 PHP Post Max Size: 200 MB PHP Time Limit: 30 PHP Max Input Vars: 3000 cURL Version: 7.68.0 OpenSSL/1.1.1f SUHOSIN Installed: – MySQL Version: 10.5.23-MariaDB-1:10.5.23+maria~ubu2004-log Max Upload Size: 200 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 8.5.2 WC Database Prefix: bi4a6hmggc_ Datenbank-Gesamtgr??e: 3625.66MB Datenbank-Datengr??e: 2158.97MB Datenbank-Indexgr??e: 1466.69MB bi4a6hmggc_woocommerce_sessions: Daten: 5.02MB + Index: 0.08MB + Engine InnoDB bi4a6hmggc_woocommerce_api_keys: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_woocommerce_attribute_taxonomies: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_woocommerce_downloadable_product_permissions: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB bi4a6hmggc_woocommerce_order_items: Daten: 90.61MB + Index: 30.56MB + Engine InnoDB bi4a6hmggc_woocommerce_order_itemmeta: Daten: 796.98MB + Index: 569.86MB + Engine InnoDB bi4a6hmggc_woocommerce_tax_rates: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB bi4a6hmggc_woocommerce_tax_rate_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_woocommerce_shipping_zones: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_woocommerce_shipping_zone_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_woocommerce_shipping_zone_methods: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_woocommerce_payment_tokens: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_woocommerce_payment_tokenmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_woocommerce_log: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_actionscheduler_actions: Daten: 6.36MB + Index: 5.81MB + Engine InnoDB bi4a6hmggc_actionscheduler_claims: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_actionscheduler_groups: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_actionscheduler_logs: Daten: 5.28MB + Index: 4.13MB + Engine InnoDB bi4a6hmggc_adtribes_my_conversions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_aepc_custom_audiences: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_aepc_logs: Daten: 5.52MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_aws_index: Daten: 1.52MB + Index: 1.13MB + Engine InnoDB bi4a6hmggc_ayssurvey_answers: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_popup_surveys: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_questions: Daten: 0.06MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_question_categories: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_sections: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_settings: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_submissions: Daten: 1.52MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_submissions_questions: Daten: 2.52MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_surveys: Daten: 0.09MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_ayssurvey_survey_categories: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_borlabs_cookie_statistics: Daten: 4.03MB + Index: 4.99MB + Engine MyISAM bi4a6hmggc_bounced_email_logs: Daten: 13.52MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_cmplz_cookiebanners: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_cmplz_cookies: Daten: 0.02MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_cmplz_services: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_commentmeta: Daten: 11.52MB + Index: 10.03MB + Engine InnoDB bi4a6hmggc_comments: Daten: 130.66MB + Index: 89.25MB + Engine InnoDB bi4a6hmggc_cr_local_forms: Daten: 4.52MB + Index: 0.25MB + Engine InnoDB bi4a6hmggc_dgwt_wcas_index: Daten: 0.08MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_dgwt_wcas_invindex_cache: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_dgwt_wcas_invindex_doclist: Daten: 1.41MB + Index: 1.77MB + Engine InnoDB bi4a6hmggc_dgwt_wcas_invindex_wordlist: Daten: 0.41MB + Index: 0.28MB + Engine InnoDB bi4a6hmggc_dgwt_wcas_stats: Daten: 1.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_dgwt_wcas_tax_index: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB bi4a6hmggc_dgwt_wcas_var_index: Daten: 0.05MB + Index: 0.06MB + Engine InnoDB bi4a6hmggc_failed_jobs: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_fql_logs: Daten: 0.02MB + Index: 0.08MB + Engine InnoDB bi4a6hmggc_iconic_wssv_index: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_itsec_opaque_tokens: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_links: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg6_database_475011: Daten: 0.05MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg6_database_570: Daten: 0.05MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg6_maps: Daten: 0.02MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_mapsvg6_r2o: Daten: 0.01MB + Index: 0.01MB + Engine MyISAM bi4a6hmggc_mapsvg6_regions_475011: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg6_regions_570: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg6_schema: Daten: 0.01MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_mapsvg6_settings: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_mapsvg_database_475011: Daten: 0.05MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg_database_570: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg_r2d: Daten: 0.00MB + Index: 0.01MB + Engine MyISAM bi4a6hmggc_mapsvg_regions_475011: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg_regions_570: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_mapsvg_schema: Daten: 0.01MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_mclean_refs: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_mclean_scan: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_mlw_qm_audit_trail: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_mlw_questions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_mlw_question_terms: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB bi4a6hmggc_mlw_quizzes: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_mlw_quiz_theme_settings: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_mlw_results: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_mlw_themes: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_newsletter: Daten: 1.52MB + Index: 0.17MB + Engine InnoDB bi4a6hmggc_newsletter_emails: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_newsletter_sent: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_newsletter_stats: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_newsletter_user_logs: Daten: 0.39MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_newsletter_user_meta: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_options: Daten: 9.23MB + Index: 1.30MB + Engine InnoDB bi4a6hmggc_postmeta: Daten: 700.98MB + Index: 524.80MB + Engine InnoDB bi4a6hmggc_posts: Daten: 115.59MB + Index: 76.83MB + Engine InnoDB bi4a6hmggc_queue: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_redirection_404: Daten: 28.92MB + Index: 4.93MB + Engine MyISAM bi4a6hmggc_redirection_groups: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_redirection_items: Daten: 0.17MB + Index: 0.13MB + Engine MyISAM bi4a6hmggc_redirection_logs: Daten: 4.62MB + Index: 0.79MB + Engine MyISAM bi4a6hmggc_spbc_auth_logs: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_spbc_backuped_files: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_spbc_backups: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_spbc_firewall_data: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_spbc_firewall_logs: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_spbc_scan_frontend: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_spbc_scan_links_logs: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB bi4a6hmggc_spbc_scan_results: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_spbc_scan_signatures: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_spbc_traffic_control_logs: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_storeabill_documentmeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_storeabill_documents: Daten: 0.00MB + Index: 0.01MB + Engine MyISAM bi4a6hmggc_storeabill_document_itemmeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_storeabill_document_items: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_storeabill_document_noticemeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_storeabill_document_notices: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_storeabill_journals: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_sumo_tbl_user_earned_coupon: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_termmeta: Daten: 0.16MB + Index: 0.06MB + Engine InnoDB bi4a6hmggc_terms: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_term_relationships: Daten: 0.36MB + Index: 0.20MB + Engine InnoDB bi4a6hmggc_term_taxonomy: Daten: 0.14MB + Index: 0.05MB + Engine InnoDB bi4a6hmggc_updraftcentral_sitemeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_updraftcentral_sites: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_updraftcentral_site_temporary_keys: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_updraftcentral_user_cron: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_usermeta: Daten: 40.56MB + Index: 30.11MB + Engine InnoDB bi4a6hmggc_users: Daten: 3.52MB + Index: 1.22MB + Engine InnoDB bi4a6hmggc_usin_events: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_usin_user_data: Daten: 0.31MB + Index: 0.26MB + Engine MyISAM bi4a6hmggc_wccs_conditions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wccs_condition_meta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_wc_admin_notes: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wc_admin_note_actions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_wc_category_lookup: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wc_customer_lookup: Daten: 25.55MB + Index: 13.06MB + Engine InnoDB bi4a6hmggc_wc_download_log: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_wc_gpf_render_cache: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_wc_orders: Daten: 0.02MB + Index: 0.11MB + Engine InnoDB bi4a6hmggc_wc_orders_meta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_wc_order_addresses: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB bi4a6hmggc_wc_order_coupon_lookup: Daten: 2.52MB + Index: 3.03MB + Engine InnoDB bi4a6hmggc_wc_order_operational_data: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_wc_order_product_lookup: Daten: 29.55MB + Index: 21.06MB + Engine InnoDB bi4a6hmggc_wc_order_stats: Daten: 21.55MB + Index: 13.55MB + Engine InnoDB bi4a6hmggc_wc_order_tax_lookup: Daten: 12.55MB + Index: 10.03MB + Engine InnoDB bi4a6hmggc_wc_product_attributes_lookup: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wc_product_download_directories: Daten: 0.00MB + Index: 0.01MB + Engine MyISAM bi4a6hmggc_wc_product_meta_lookup: Daten: 0.02MB + Index: 0.09MB + Engine InnoDB bi4a6hmggc_wc_rate_limits: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wc_reserved_stock: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wc_tax_rate_classes: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_wc_webhooks: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_wdp_orders: Daten: 0.09MB + Index: 0.04MB + Engine MyISAM bi4a6hmggc_wdp_order_items: Daten: 0.06MB + Index: 0.06MB + Engine MyISAM bi4a6hmggc_wdp_persistent_rules_cache: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wdp_rules: Daten: 0.01MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wdr_order_discounts: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wdr_order_item_discounts: Daten: 0.03MB + Index: 0.04MB + Engine MyISAM bi4a6hmggc_wdr_rules: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wfblockediplog: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wfblocks7: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB bi4a6hmggc_wfconfig: Daten: 0.09MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wfcrawlers: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wffilechanges: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wffilemods: Daten: 0.27MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wfhits: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB bi4a6hmggc_wfhoover: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_wfissues: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB bi4a6hmggc_wfknownfilelist: Daten: 0.13MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wflivetraffichuman: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_wflocs: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wflogins: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_wfls_2fa_secrets: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_wfls_settings: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wfnotifications: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wfpendingissues: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB bi4a6hmggc_wfreversecache: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_wfsnipcache: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB bi4a6hmggc_wfstatus: Daten: 5.52MB + Index: 3.03MB + Engine InnoDB bi4a6hmggc_wftrafficrates: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_woocommerce_amazon_buyer_index: Daten: 0.04MB + Index: 0.06MB + Engine MyISAM bi4a6hmggc_woocommerce_gpf_google_taxonomy: Daten: 1.52MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_woocommerce_gzd_dhl_im_products: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_woocommerce_gzd_dhl_im_product_services: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_woocommerce_gzd_dhl_labelmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_woocommerce_gzd_dhl_labels: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_woocommerce_gzd_packaging: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_woocommerce_gzd_packagingmeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_woocommerce_gzd_shipmentmeta: Daten: 32.56MB + Index: 12.03MB + Engine InnoDB bi4a6hmggc_woocommerce_gzd_shipments: Daten: 7.52MB + Index: 4.55MB + Engine InnoDB bi4a6hmggc_woocommerce_gzd_shipment_itemmeta: Daten: 16.55MB + Index: 16.03MB + Engine InnoDB bi4a6hmggc_woocommerce_gzd_shipment_items: Daten: 4.52MB + Index: 6.06MB + Engine InnoDB bi4a6hmggc_woocommerce_gzd_shipment_labelmeta: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_woocommerce_gzd_shipment_labels: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_woocommerce_gzd_shipping_provider: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_woocommerce_gzd_shipping_providermeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_wpr_rocket_cache: Daten: 0.07MB + Index: 0.07MB + Engine MyISAM bi4a6hmggc_wpr_rucss_used_css: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wt_iew_action_history: Daten: 0.02MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_wt_iew_mapping_template: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_yoast_indexable: Daten: 0.23MB + Index: 0.09MB + Engine InnoDB bi4a6hmggc_yoast_indexable_hierarchy: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB bi4a6hmggc_yoast_migrations: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB bi4a6hmggc_yoast_primary_term: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB bi4a6hmggc_yoast_prominent_words: Daten: 0.00MB + Index: 0.00MB + Engine MyISAM bi4a6hmggc_yoast_seo_links: Daten: 0.19MB + Index: 0.13MB + Engine InnoDB bi4a6hmggc_yoast_seo_meta: Daten: 3.52MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_bans: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_elements: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_logs: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_other_answers: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_polls: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_skins: Daten: 0.28MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_subelements: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_templates: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB bi4a6hmggc_yoppoll_votes: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB _blacklist: Daten: 2.52MB + Index: 2.52MB + Engine InnoDB ### Post Type Counts ### acf-field: 11 acf-field-group: 3 attachment: 2003 ays-survey-maker: 6 blocks: 12 boxzilla-box: 1 br_notice: 2 custom_css: 2 customerstory: 1 document_template: 11 eos_dyn_content: 1 gp_elements: 7 invoice: 2 jetpack_migration: 2 kundenstory: 79 mailpoet_page: 1 mapsvg: 2 mc4wp-form: 1 ml-slide: 23 ml-slider: 8 nab_experiment: 7 nav_menu_item: 61 oembed_cache: 25 page: 54 post: 5 product: 90 product_variation: 63 qsm_quiz: 1 schema: 4 shop_coupon: 301 shop_order: 180439 shop_order_refund: 2748 wafs: 1 was: 15 wll_records: 1708 wp-rest-api-log: 2315 wpcf7_contact_form: 2 wpsl_stores: 71 ywrfd-discount: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (35) ### Advanced Custom Fields PRO: von WP Engine – 6.2.6.1 FiboSearch - AJAX Search for WooCommerce (Pro): von FiboSearch Team – 1.27.1 Complianz | GDPR/CCPA Cookie Consent: von Really Simple Plugins – 6.5.6 Confetti: von WP Sunshine – 1.3.6 Contact Form 7: von Takayuki Miyoshi – 5.8.7 Customer Reviews for WooCommerce: von CusRev – 5.39.1 GTM4WP - A Google Tag Manager (GTM) plugin for WordPress: von Thomas Geiger – 1.20 GP Premium: von Tom Usborne – 2.4.0 Rechtstexte-Schnittstelle der IT-Recht Kanzlei: von IT-Recht Kanzlei – 1.0.8 Min and Max Quantity for WooCommerce: von BeRocket – 1.3.4.1 Newsletter: von Stefano Lissa & Das Newsletter Team – 8.1.1 Payment Plugins for PayPal WooCommerce: von Payment Plugins [email protected] – 1.0.43 Redirection: von John Godley – 5.4.2 WooCommerce Show Single Variations by Iconic: von Iconic – 1.16.2 Side Cart WooCommerce: von XootiX – 2.4.9 Survey Maker: von Survey Maker team – 4.1.2 Advanced Editor Tools: von Automattic – 5.9.2 vendidero Helper: von vendidero – 2.2.2 Woo Discount Rules PRO 2.0: von Flycart – 2.6.2 Woo Discount Rules: von Flycart – 2.6.2 WooCommerce Permalink Manager (Premium): von premmerce – 2.0.1 Product Feed PRO for WooCommerce: von AdTribes.io – 13.2.4 Payment Plugins for Stripe WooCommerce: von Payment Plugins [email protected] – 3.3.57 WooCommerce Advanced Shipping: von Jeroen Sormani – 1.0.14 WooCommerce Color or Image Variation Swatches: von sysbasics – 3.8.3 WooCommerce Amazon Pay: von WooCommerce – 2.5.1 Germanized für WooCommerce Pro: von vendidero – 3.10.0 Germanized für WooCommerce: von vendidero – 3.15.6 WooCommerce Product Dependencies: von SomewhereWarm – 1.2.8 WooCommerce Price Based on Country: von Oscar Gare – 3.4.2 WooCommerce Sponsor a Friend Plugin: von MB Création – 2.3.2 WooCommerce: von Automattic – 8.5.2 (Update auf Version 8.6.0 ist verfügbar) Yoast SEO: von Team Yoast – 22.0 WP Rocket: von WP Media – 3.15.9 WP Store Locator: von Tijmen Smit – 2.2.241 ### Inactive Plugins (1) ### Nelio A/B Testing: von Nelio Software – 6.3.3 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### 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-filtered (exclude-from-filtered) 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 Woo.com: ? Enforce Approved Product Download Directories: – HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: – ### WC Pages ### Shop-Basis: #503048 - /alle-ago-produkte/ Warenkorb: #72 - /warenkorb/ Kasse: #12 - /kasse/ Mein Konto: #70 - /mein-konto/ Allgemeine Gesch?ftsbedingungen: #688 - /allgemeine_geschaeftsbedingungen/ ### Theme ### Name: GeneratePress Child Theme Version: 1.0 Author URL: https://my-blog-shop.de Child Theme: ? Parent Theme Name: GeneratePress Parent Theme Version: 3.4.0 Parent Theme Author URL: https://tomusborne.com WooCommerce Support: ? ### Templates ### Overrides: generatepress_child/woocommerce/cart/cart.php generatepress_child/woocommerce/emails/customer-note.php generatepress_child/woocommerce/emails/customer-processing-order.php generatepress_child/woocommerce/single-product/add-to-cart/variation.php ### Geolocation debug info ### Default customer location: geolocation MaxMind GeoIP database: ? MaxMind GeoIP license: ? MM_COUNTRY_CODE: ? GEOIP_COUNTRY_CODE: ? HTTP_CF_IPCOUNTRY: ? HTTP_X_COUNTRY_CODE: ? HTTP_X_REAL_IP: ? HTTP_X_FORWARDED_FOR: ? REMOTE_ADDR: 46.223.163.198 Real external IP: 2a02:8071:3e89:8100:4585:d3b:d142:6dd6 WCPBC_USE_REMOTE_ADDR: – Geolocation Test: ? ### PBC Settings ### Version: 3.4.2 Base location: DE:DE-NW Base currency: EUR Price Based On: shipping Shipping: – Test mode: – Test country: – Load products price in background: – Prices entered with tax: ? Calculate tax based on: shipping Display prices in the shop: incl ### Zone Pricing Drittl?nder ### zone_id: drittlaender enabled: yes name: Drittl?nder countries: CH currency: EUR exchange_rate: 0.840336134454 auto_exchange_rate: no disable_tax_adjustment: no order: 9999 ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks product-variation-management product-virtual-downloadable product-external-affiliate product-grouped remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: customize-store minified-js new-product-management-experience product-linked settings async-product-editor-category-field Daily Cron: ? Next scheduled: 2024-02-20 10:42:20 +01:00 Options: ? Notes: 17 Onboarding: completed ### Action Scheduler ### Abgeschlossen: 16.408 Oldest: 2024-01-19 16:34:09 +0100 Newest: 2024-02-19 16:27:18 +0100 Fehlgeschlagen: 841 Oldest: 2022-04-02 14:42:30 +0200 Newest: 2023-12-14 18:24:46 +0100 Ausstehend: 6 Oldest: 2024-02-19 20:48:58 +0100 Newest: 2024-02-20 15:38:38 +0100 ### Status report information ### Generated at: 2024-02-19 16:27:38 +01:00
- This reply was modified 9 months, 2 weeks ago by cutu234.
We’ve just looked deeper into this extremely difficult issue. It’s almost certain that it does only happen to orders with a standard discount coupon applied. Actually, we can find wrong numbers in the database.
Here is an example. One specific product is 38,90 including 19% VAT. So, the net price is: 38,90/119*100 = 32,6890756302521. We offer a discount of 20%:
32,6890756302521 – 6,53781512605042 = 26,1512605042017
What I find in the wp_wc_order_product_lookup table: The product net revenue is calculated correctly: 26,15. The coupon amount, on the other hand, is saved as 6.537816. While this minor error shouldn’t change very much, it is simply wrong rounding. The “6” at the end should be “5”.
Here’s the next strange thing. In the following screenshot you can see the individual dicounts:
6,54 + 0,66 + 20,99 sum up to 28,19. The correct sum, however, is 28,18:
Don’t get me wrong. Personally, I do not care about 1 cent, but our inventory control system does. All incorrect orders have to changed manually which is uper time-consuming.
Hey, @cutu234!
Thank you for this detailed investigation. I understand how important it is to solve this and we will do our best to help you solve it as soon as possible.
Can you please update WooCommerce to the latest version (8.6.1) along with anything else that needs updating?
Are you using the regular WooCommerce coupons or a third-party plugin? I see you have Discount plugins activated.
Can you please run a conflict test to see if the issue persists?
To test, you’ll first want to change the theme on your site to Storefront, then you’ll want to deactivate all plugins except for WooCommerce and make some test orders. If that fixes the problem, re-enable the other plugins one by one (gradually), checking after each, to see where the issue is coming from.
— Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality or you can consider using a service like Jetpack. If something goes wrong, you will be able to restore it.
— Also, you can consider using a plugin like Health Check & Troubleshooting. This is a plugin developed by the WordPress community and it is helpful to disable plugins without affecting your current site visitors.
— It is important to consider as well a staging functionality in case you would not like to touch your production site (you can ask your host if they offer this service), or you can use WP Staging for quickly spinning up a new test site.
You can find more about this in this guide.
Please let us know about your findings.
Looking forward to your reply.
Have a wonderful day!
Hi there,
thank you very much for the input. Troubleshooting is always a bitch in a live shop. ??However, I think that I found something. We use the standard Woocommerce discount feature. Nothing special here. It seems that the rounding to 2 digits yields to this problem. Let me give you an example:
A product is 42,90 incl. VAT. We apply a discount of 10%. Net price after discount:
32,4453781512605
Total incl. VAT:
32,4453781512605/100*119 = 38,61Now, let’s take the same order calculating it with only 2 digits:
32,45/100*119 = 38,6155 = 38,62
We have two roundings: the first one was calculated after the discount was applied and the second one after VAT was included. This results in a difference of 1 cent.
The problem: the numbers are stored with only 2 digits in the database. This is the value that is submitted to Paypal, for example and then to the inventory control system. The system gets two different values: 38,61 from Woocommerce and 38,62 from the payment API. These orders are blocked for automatic processing and have to changed manually.
If more products were purchased, the rounding errors might compensate each other or might even get worse. This is why some orders are perfectly fine, while others are off.
With no discount, no rounding is applied, of course.
Any idea how to fix this?
- This reply was modified 9 months, 1 week ago by cutu234.
To sum it up more clearly: I could change the number of digits on the general settings page. This would then store the numbers with, say, 6 digits in the database. But I don’t want to show 6 digits in the shop or in the emails, of course. That would look silly.
Is there a workaround for this?
- This reply was modified 9 months, 1 week ago by cutu234.
By the way, this is by no means a new problem. It was posted 2019 on Github. So, it is not resolved after more than 4 years?
I think we can boil it down to one single problem: Rounding should never be applied on a subitem level. In addition to that: The number of digits in the database should be seperated from the format shown on the frontend.
Hi there @cutu234 ??
Thank you for reaching back, with further details on this.
By the way, this is by no means a new problem. It was posted 2019 on Github. So, it is not resolved after more than 4 years?
Please note, the issue linked here was marked as closed on 2019, and then changes were merged in 2021.
To sum it up more clearly: I could change the number of digits on the general settings page. This would then store the numbers with, say, 6 digits in the database. But I don’t want to show 6 digits in the shop or in the emails, of course. That would look silly.
Let’s go ahead with isolating this further. So far, from what I gather, these parameters come into play:
- price rounding
- discount coupon
- number of digits
I understand with 2 digits, and without a discount coupon, there is no issue. Correct?
Would having 1 decimal number, at the store, instead, be an option or otherwise?
Otherwise, could the discount be other than percentage-based, perhaps?
We look forward to your response. In the meantime, please let us know if you have any further questions or concerns.
OK, I think we found a solution. We can set the general settings to 6 digits and use this snippet to show only 2 digits on the frontend, in emails etc.
add_filter('wc_price_args', 'wc_force_decimals_for_price_display'); function wc_force_decimals_for_price_display($args) { if (isset($args['force_decimals'])) { $args['decimals'] = $args['force_decimals']; } else { $args['decimals'] = 2; } return $args; }
This seems to work just fine.
However, you should really implement this feature so that digits can be set seperately for the database and the frontend. Actually, it is never a good idea to store values with 2 digits only. This is a recipe for trouble.
I know that this is probably not a big deal in the US. However, tax calulation is a pain in the neck in Europe. It gets even worse if you use an external system for inventory, receipts etc. like we do.
Why not making the wc_price_args filter available in the dashboard? This would be a great solution and could be implemented easily, I guess.
I cheered too soon. Now we have a very high rate of pending orders with Paypal because of some “amount mismatch.”
With 6 digits, the calculation is even worse. See this screenshot please. The numbers are correctly stored in the database but don’t add up:
54,90 – 8,24 is NOT 46,67 but 46,66, of course.
What now?
Hey, @cutu234!
Thank you for all the troubleshooting and information you shared.
Do you mind sharing screenshots of how you set up things on your site so we can run some tests and try to replicate this issue on our end so we can investigate this further?
We would need to see:
- VAT settings
- Coupon settings
- Product price settings (of one of the products you had the issue with)
I recommend using https://snipboard.io. You can share the direct link to the image as a response to this topic. Please remove any sensitive information before sharing them.
Looking forward to your reply.
Have a wonderful day!
Thank you very much. Your effort is very much appreciated!
Here are the typical settings for the coupons:
https://snipboard.io/v5fJny.jpg
https://snipboard.io/kC1hlD.jpg
No further restrictions.
Here is a typical product:
https://snipboard.io/fuqwzy.jpg
However, this can happen with all products.
I simply don’t understand how the rounding errors can happen even with 6 digits stored in the database. The only pattern I can see is a coupon applied. It seems to me that the calculation is performed with rounded values. Depending on the original price this can result in a difference of 1 cent.
Hey, @cutu234!
Thank you for the information.
I was able to replicate this on my website.
The orders were updated automatically, but I was able to see the rounding issue.
I have opened a GitHub report so we can investigate this further. If you want to be updated about it you can follow it here.
We are doing our best to fix it as soon as possible.
We can’t specify a date when the bug will be fixed, it is still in progress. We apologize for any inconvenience this may have caused you, and we thank you for your patience.
Please let us know if there’s anything else we can do to help or if you have any questions.
Have a wonderful day!
- The topic ‘Rounding errors’ is closed to new replies.