Round Shipping with VAT 20%
-
Hello
I need your help to fix a rounding problem with the shipping costs.
my problem in shipping :
4.95 includes 20% VAT
4.95 / 1.2 = 4.125
So, i put the value 4.125 in the shipping costs.In the shopping cart page, the shipping cost is 4.96. There is 0.01 difference.
Can you help me ?
Sincerely
-
Hi @tortuepoke. What version of WooCommerce are you running? Can you please share your system report with me. You can find it by going to WooCommerce > Status > Get system report and then click Copy for support to be able to paste it in your reply.
Hi,
My version of Woocommerce : 4.0.1
`
### WordPress Environment ###WordPress address (URL): #
Site address (URL): #
WC Version: 4.0.1
REST API Version: ? 1.0.7
WC Blocks Version: ? 2.5.14
Action Scheduler Version: ? 3.1.4
WC Admin Version: ? 1.0.3
Log Directory Writable: ?
WP Version: 5.4
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: ?
WP Cron: ?
Language: fr_FR
External object cache: –### Server Environment ###
Server Info: Apache
PHP Version: 7.1.33 – Nous recommandons d’utiliser PHP?7.2 ou supérieur pour optimiser les performances et la sécurité. Comment mettre à jour votre version de PHP??
PHP Post Max Size: 16 MB
PHP Time Limit: 120
PHP Max Input Vars: 1000
cURL Version: 7.38.0
OpenSSL/1.0.1tSUHOSIN Installed: –
MySQL Version: 5.5.5-10.0.38-MariaDB-0+deb8u1
Max Upload Size: 2 MB
Default Timezone is UTC: ?
fsockopen/cURL: ?
SoapClient: ?
DOMDocument: ?
GZip: ?
Multibyte String: ?
Remote Post: ?
Remote Get: ?### Database ###
WC Database Version: 4.0.1
WC Database Prefix: jcnW7_
Taille totale de la base de données: 3.37MB
Taille de la base de données: 1.97MB
Taille de l’index: 1.40MB
jcnW7_woocommerce_sessions: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_woocommerce_api_keys: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_woocommerce_attribute_taxonomies: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_woocommerce_downloadable_product_permissions: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB
jcnW7_woocommerce_order_items: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_woocommerce_order_itemmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_woocommerce_tax_rates: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB
jcnW7_woocommerce_tax_rate_locations: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_woocommerce_shipping_zones: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB
jcnW7_woocommerce_shipping_zone_locations: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_woocommerce_shipping_zone_methods: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB
jcnW7_woocommerce_payment_tokens: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_woocommerce_payment_tokenmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_woocommerce_log: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_actionscheduler_actions: Données?: 0.02MB + Index?: 0.11MB + Moteur InnoDB
jcnW7_actionscheduler_claims: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_actionscheduler_groups: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_actionscheduler_logs: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_commentmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_comments: Données?: 0.02MB + Index?: 0.08MB + Moteur InnoDB
jcnW7_dolly_plugin_table: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB
jcnW7_links: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_options: Données?: 1.06MB + Index?: 0.06MB + Moteur InnoDB
jcnW7_postmeta: Données?: 0.06MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_posts: Données?: 0.05MB + Index?: 0.06MB + Moteur InnoDB
jcnW7_termmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_terms: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_term_relationships: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_term_taxonomy: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_usermeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_users: Données?: 0.02MB + Index?: 0.05MB + Moteur InnoDB
jcnW7_wc_admin_notes: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB
jcnW7_wc_admin_note_actions: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_wc_category_lookup: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB
jcnW7_wc_customer_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_wc_download_log: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_wc_order_coupon_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_wc_order_product_lookup: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB
jcnW7_wc_order_stats: Données?: 0.02MB + Index?: 0.05MB + Moteur InnoDB
jcnW7_wc_order_tax_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB
jcnW7_wc_product_meta_lookup: Données?: 0.02MB + Index?: 0.09MB + Moteur InnoDB
jcnW7_wc_tax_rate_classes: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB
jcnW7_wc_webhooks: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB### Post Type Counts ###
attachment: 17
customize_changeset: 1
page: 8
post: 15
product: 13
revision: 2
schema: 2
wafs: 2### Security ###
Secure connection (HTTPS): ?
Hide errors from visitors: ?Les messages d’erreur ne doivent pas s’afficher aux visiteurs.### Active Plugins (5) ###
Brute Force Login Protection: par Fresh-Media – 1.5.3
Child Theme Generator: par Serafino Corriero – 2.2.6
Classic Editor: par Contributeurs et contributrices WordPress – 1.5
Woocommerce Table Rate Shipping: par JEM Plugins – 2.0.8
WooCommerce: par Automattic – 4.0.1### Inactive Plugins (6) ###
Akismet Anti-Spam: par Automattic – 4.1.4
Flexible Shipping: par WP Desk – 3.9.16
Schema & Structured Data for WP & AMP: par Magazine3 – 1.9.34
Schema – All In One Schema Rich Snippets: par Brainstorm Force – 1.6.1
SOGO Add Script Header Footer: par orenhav (SOGO) – 3.9
Structured Content: par Gordon B?hme
Antonio Leutsch – 1.4.4### Settings ###
API Enabled: –
Force SSL: –
Currency: EUR (€)
Currency Position: right
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 ###
Base de la boutique: #11 – /index.php/boutique/
Panier: #12 – /index.php/panier/
Validation de la commande: #13 – /index.php/commande/
Mon compte: #14 – /index.php/mon-compte/
Conditions générales de vente et d’utilisation: ? Page non définie### Theme ###
Name: storefront child theme
Version: 1.0
Author URL:
Child Theme: ?
Parent Theme Name: Storefront
Parent Theme Version: 2.5.5
Parent Theme Author URL: https://woocommerce.com/
WooCommerce Support: ?### Templates ###
Overrides: –
### Action Scheduler ###
Terminer: 8
Oldest: 2020-04-27 10:47:29 +0000
Newest: 2020-04-27 19:41:59 +0000Thanks for the system report:
4.95 / 1.2 = 4.125
So, i put the value 4.125 in the shipping costs.In the shopping cart page, the shipping cost is 4.96
This is because of the amount of decimals. You must set your decimals to 3 in WooCommerce >> Settings >> General, since you are using three digits behind the comma for your shipping rate (4.125).
This will correct the rounding.
Kind regards,
Thanks Con Schneider,
When i change decimals to 3, it works but i don’t want to display 3 decimals in the shop.
Is it possible to keep 4,95 (VAT 20%) and to display 2 decimals to visitors ?Regards
Hi,
So, someone says how to display 2 decimals in the shop and in the same time keep 3 decimals in the calculation ?
Regards
- The topic ‘Round Shipping with VAT 20%’ is closed to new replies.