dokterry
Forum Replies Created
-
Hi All,
I think I’m not making one part of this clear. These three screen captures should help.
https://snipboard.io/v3mB8R.jpg
In this capture, I am selling a book, which is subject to sales tax. The Discount Rule for the book takes the discount, and WooCommerce calculates sales tax on the final discounted price of the book and does not calculate any sales tax on the discount.
https://snipboard.io/seJqx1.jpg
In the second screen capture, I am selling classes which are not subject to sales tax. As you can see, the discount is calculated correctly, there is no sales tax applied to the discount, and there is no sales tax in the tax column. Again, doing exactly as it should.
https://snipboard.io/uSyHpv.jpg
However, when I put the non taxable classes and the taxable book in the cart at the same time, WooCommerce is calculating the negative sales tax on the discount and subtracting it from the overall sales tax as if I had value added tax included in my price, which I do not. As you can see from the first capture to the third capture, the amount of sales tax collected on the same number of books, is decreased by the amount of sales tax calculated on the discount for the non taxable classes, that is, $9.26 instead of the correct amount of $11.48 as shown in the first capture when the books are in the cart by themselves.
Finally, we only have one region we are where we are required to collect sales tax. When we sell to any other region or country where we are not required to collect sales tax, WooCommerce correctly does not calculate sales tax and there is no sales tax calculated on the discount, even when the book and the classes are in the cart at the same time.`
Thanks again for all your help in this matter.
Terry
Hi,
The problem only occurs when there is a discount taken. If I disable Woo Discount Rules PRO 2.0: by Flycart – 2.3.8 then there will be no discount so of course the issue will disappear, since the error only occurs because WooCommerce is calculating taxes on the discount, despite my options In WooCommerce being set to non-taxable and prices are tax exclusive.
While I’m not saying there isn’t a conflict, all tax calculations are being done by WooCommerce, not the plugin. WooCommerce is treating the discount as if the product was taxable (it’s not) and as if the prices were tax Inclusive they are not). WooCommerce is ignoring it’s own options and doing it’s calculations for taxes as if the product was subject to VAT, which it is not.
Any word yet on why WooCommerce is removing the taxes on the discount as if the item is taxable and the price is Tax-Inclusive, when the item has been marked as non-taxable and the prices are Tax-Exclusive?
Thanks,
Terry
Hi,
I haven’t heard back if you were able to reproduce this on your end or not. Looking at this, to put it more simply, the problem seems to be:
1. I have checked the option that prices are being entered Exclusive of tax, and that only a Book is taxable, and all classes are non-taxable.
2. Despite this, WooCommerce:
A. is ignoring that the item(s) being discounted (Classes) are marked as non-
taxable and
B. is ignoring that All Product Prices are entered Exclusive of tax,
C. calculating the tax on the discount taken on A & B as if Prices were entered
Inclusive of tax, and then
D. Subtracting the tax discount it calculated in C from the actual taxes
calculated from the taxable item (the book) which leads to an undercollection
of taxes.This seems to be a bug in the logic used to determine on which items should and should not have taxes calculated. It’s ignoring the options for Non-Taxable items and Prices entered Exclusive of tax, and calculating how much tax should be removed via the discount as if the item was subject to VAT, etc.
Is there a code snippet available that would force WooCommerce to calculate taxes based on the parameters noted above (All Prices Exclusive of Tax) and not calculate a discount of non-existent taxes on the discount?
Thanks for your help.
Terry
Hi @rainfallnixfig,
Thanks for your reply. Here are two screen shots showing cart and the tax calculation error (Tax rate is 8.475%)
https://snipboard.io/GuhZAH.jpg
https://snipboard.io/j567Xr.jpg
In the second screen shot, you can see that the discount of $61.00 is listed as $62.42. The system is taking this Negative $1.42 and subtracting it from the actual tax, leaving a tac collected of $.33 (instead of the actual tax, $5.75)
Here are my general tax settings (I only turned on the option Display taxes in cart and checkout – including taxes – to make it more obvious what’s happening, If I turn this option off, it still calculates a tax of $4.33, instead of $5.75
https://snipboard.io/7uyWtK.jpg
https://snipboard.io/PRdzQa.jpg
https://snipboard.io/lUhfWj.jpg
https://snipboard.io/y6Mfgs.jpghere are screen shots of the product info for all three products.
Book (Taxable)
https://snipboard.io/PUWX13.jpg
Class Part 1 (Non-Taxable)
https://snipboard.io/sHAE3i.jpg
Class Part 2 (Non-Taxable)
https://snipboard.io/Swdio5.jpg
Thanks again for all your help. If you need anything else, please let me know.
Terry
here’s my WooCommerce System Status Report:
### WordPress Environment ### WordPress address (URL): https://dcpowerhours.com Site address (URL): https://dcpowerhours.com WC Version: 5.5.1 REST API Version: ✔ 5.5.1 WC Blocks Version: ✔ 5.3.2 Action Scheduler Version: ✔ 3.2.1 WC Admin Version: ✔ 2.4.1 Log Directory Writable: ✔ WP Version: 5.8 WP Multisite: – WP Memory Limit: 257 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.3.29 PHP Post Max Size: 32 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.77.0 OpenSSL/1.1.1k SUHOSIN Installed: – MySQL Version: 5.7.35 Max Upload Size: 32 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 5.5.1 WC Database Prefix: wp4v_ Total Database Size: 112.95MB Database Data Size: 71.11MB Database Index Size: 41.84MB wp4v_woocommerce_sessions: Data: 0.63MB + Index: 0.03MB + Engine MyISAM wp4v_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_woocommerce_order_items: Data: 0.33MB + Index: 0.09MB + Engine MyISAM wp4v_woocommerce_order_itemmeta: Data: 3.20MB + Index: 1.00MB + Engine MyISAM wp4v_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp4v_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_woocommerce_payment_tokens: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp4v_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.02MB + Engine MyISAM wp4v_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_actionscheduler_actions: Data: 0.66MB + Index: 0.31MB + Engine MyISAM wp4v_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp4v_actionscheduler_logs: Data: 0.48MB + Index: 0.38MB + Engine MyISAM wp4v_advanced_notifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_advanced_notification_triggers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_automatewoo_abandoned_carts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp4v_automatewoo_customers: Data: 0.09MB + Index: 0.13MB + Engine InnoDB wp4v_automatewoo_customer_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp4v_automatewoo_events: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp4v_automatewoo_guests: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp4v_automatewoo_guest_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp4v_automatewoo_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp4v_automatewoo_log_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp4v_automatewoo_queue: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp4v_automatewoo_queue_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp4v_automatewoo_referrals: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp4v_automatewoo_referral_advocate_keys: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp4v_automatewoo_referral_invites: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp4v_cartflows_ca_cart_abandonment: Data: 1.52MB + Index: 0.02MB + Engine InnoDB wp4v_cartflows_ca_email_history: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp4v_cartflows_ca_email_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_cartflows_ca_email_templates_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp4v_commentmeta: Data: 0.03MB + Index: 0.02MB + Engine MyISAM wp4v_comments: Data: 0.33MB + Index: 0.16MB + Engine MyISAM wp4v_csp3_subscribers: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp4v_cspv5_pages: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp4v_ir_paypal_payouts_transactions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_ld_notifications_delayed_emails: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_learndash_pro_quiz_category: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_learndash_pro_quiz_form: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_learndash_pro_quiz_lock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_learndash_pro_quiz_master: Data: 0.07MB + Index: 0.00MB + Engine MyISAM wp4v_learndash_pro_quiz_prerequisite: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_learndash_pro_quiz_question: Data: 0.32MB + Index: 0.01MB + Engine MyISAM wp4v_learndash_pro_quiz_statistic: Data: 2.20MB + Index: 0.92MB + Engine MyISAM wp4v_learndash_pro_quiz_statistic_ref: Data: 0.89MB + Index: 1.36MB + Engine MyISAM wp4v_learndash_pro_quiz_template: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_learndash_pro_quiz_toplist: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_learndash_user_activity: Data: 3.74MB + Index: 8.46MB + Engine MyISAM wp4v_learndash_user_activity_meta: Data: 26.44MB + Index: 24.09MB + Engine MyISAM wp4v_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_mailchimp_carts: Data: 0.09MB + Index: 0.00MB + Engine MyISAM wp4v_mailchimp_jobs: Data: 0.06MB + Index: 0.00MB + Engine MyISAM wp4v_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_nextend2_image_storage: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp4v_nextend2_section_storage: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp4v_nextend2_smartslider3_generators: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_nextend2_smartslider3_sliders: Data: 0.08MB + Index: 0.03MB + Engine InnoDB wp4v_nextend2_smartslider3_sliders_xref: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp4v_nextend2_smartslider3_slides: Data: 0.09MB + Index: 0.11MB + Engine InnoDB wp4v_options: Data: 3.38MB + Index: 0.15MB + Engine MyISAM wp4v_postmeta: Data: 3.20MB + Index: 1.36MB + Engine MyISAM wp4v_posts: Data: 3.75MB + Index: 0.32MB + Engine MyISAM wp4v_prflxtrflds_fields_id: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_prflxtrflds_fields_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp4v_prflxtrflds_field_values: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_prflxtrflds_roles_and_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_prflxtrflds_roles_id: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_prflxtrflds_user_field_data: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_prflxtrflds_user_roles: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp4v_rrf_survey: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_talentlms_categories: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_talentlms_courses: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_talentlms_products: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_talentlms_products_categories: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_termmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp4v_terms: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp4v_term_relationships: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp4v_term_taxonomy: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_uap_action_log: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp4v_uap_action_logs_view: Data: 0.00MB + Index: 0.00MB + Engine wp4v_uap_action_log_meta: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp4v_uap_closure_log: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp4v_uap_closure_log_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp4v_uap_recipe_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp4v_uap_recipe_logs_view: Data: 0.00MB + Index: 0.00MB + Engine wp4v_uap_trigger_log: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp4v_uap_trigger_logs_view: Data: 0.00MB + Index: 0.00MB + Engine wp4v_uap_trigger_log_meta: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp4v_usermeta: Data: 18.07MB + Index: 1.16MB + Engine MyISAM wp4v_users: Data: 0.06MB + Index: 0.07MB + Engine MyISAM wp4v_usin_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp4v_usin_user_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp4v_wc_admin_notes: Data: 0.03MB + Index: 0.00MB + Engine MyISAM wp4v_wc_admin_note_actions: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp4v_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_wc_customer_lookup: Data: 0.05MB + Index: 0.06MB + Engine MyISAM wp4v_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_wc_order_product_lookup: Data: 0.24MB + Index: 0.21MB + Engine MyISAM wp4v_wc_order_stats: Data: 0.04MB + Index: 0.04MB + Engine MyISAM wp4v_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_wc_product_meta_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp4v_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp4v_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_wdm_instructor_commission: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp4v_wdr_order_discounts: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp4v_wdr_order_item_discounts: Data: 0.04MB + Index: 0.01MB + Engine MyISAM wp4v_wdr_rules: Data: 0.03MB + Index: 0.00MB + Engine MyISAM ### Post Type Counts ### acf-field: 4 acf-field-group: 4 attachment: 139 customize_changeset: 3 forum: 1 ld-notification: 1 nav_menu_item: 20 page: 39 post: 2 product: 18 revision: 1304 sfwd-certificates: 17 sfwd-courses: 17 sfwd-lessons: 199 sfwd-question: 245 sfwd-quiz: 158 shop_coupon: 9 shop_order: 584 shop_order_refund: 7 topic: 8 uo-action: 4 uo-recipe: 4 uo-trigger: 4 wdm_course_feedback: 25 wdm_course_review: 38 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (38) ### Advanced Custom Fields: by Delicious Brains – 5.9.8 AutomateWoo - Refer A Friend Add-on: by WooCommerce – 2.6.1 AutomateWoo: by WooCommerce – 5.4.0 bbPress: by The bbPress Contributors – 2.6.6 Bulk Edit Products, Prices & Attributes for Woocommerce: by ELEX – 1.0.3 Code Snippets: by Code Snippets Pro – 2.14.1 Extended CRM For Users Insights: by denizz – 1.2.1 Facebook for WooCommerce: by Facebook – 2.3.2 FCF Shortcodes For LearnDash: by Discover eLearning Ltd – 0.1 Jetpack: by Automattic – 9.9.1 LearnDash Group Registration: by WisdmLabs – 4.1.5 LearnDash LMS - Certificate Builder: by LearnDash – 1.0.3 LearnDash LMS - Notifications: by LearnDash – 1.5.2 LearnDash LMS - ProPanel: by LearnDash – 2.1.4.1 LearnDash LMS - WooCommerce Integration: by LearnDash – 1.9.2 Mailchimp for WooCommerce: by Mailchimp – 2.5.1 PFK Bonus Shortcodes 6 - usage ex: [pfk_bonus_courseinfo show="pace"]: by Patrick F. Kellogg – 1.6 Profile Extra Fields by BestWebSoft: by BestWebSoft – 1.2.1 SeedProd Coming Soon Page Pro: by SeedProd – 5.12.9 LearnDash LMS: by LearnDash – 3.4.2.1 Smart Slider 3: by Nextend – 3.5.0.9 TalentLMS: by Epignosis LLC – 6.6.9.3 Uncanny Automator: by Uncanny Owl – 3.0.5 Uncanny Toolkit for LearnDash: by Uncanny Owl – 3.5.1 Users Insights: by Pexeto – 4.0.1 LearnDash Ratings, Reviews, and Feedback: by WisdmLabs – 2.1.0 WooCommerce Cart Abandonment Recovery: by CartFlows Inc – 1.2.13 Checkout Field Editor for WooCommerce: by ThemeHigh – 1.4.8 Woo Discount Rules PRO 2.0: by Flycart – 2.3.8 Woo Discount Rules: by Flycart – 2.3.8 Advanced Order Export For WooCommerce: by AlgolPlus – 3.1.9 Product Gallery Slider for WooCommerce: by codeixer – 2.1.3 WooCommerce Advanced Notifications: by WooCommerce – 1.2.29 (update to version 1.2.31 is available) Print Invoice & Delivery Notes for WooCommerce: by Tyche Softwares – 4.6.2 WooCommerce Stripe Gateway: by WooCommerce – 5.3.0 WooCommerce Shipping & Tax: by WooCommerce – 1.25.17 WooCommerce Smart Coupons: by StoreApps – 4.18.0 (update to version 4.25.1 is available) WooCommerce: by Automattic – 5.5.1 ### Inactive Plugins (9) ### Akismet Anti-Spam: by Automattic – 4.1.6 All-in-One WP Migration: by ServMask – 7.39 Embed Any Document: by Awsm Innovations – 2.6.1 Google Ads & Marketing by Kliken: by Kliken – 1.0.7 Instructor Role: by WisdmLabs – 3.5.4 LearnDash Content Cloner: by WisdmLabs – 1.2.9.2 Powerpack for LearnDash: by Immerseus – 1.2.0 Quiz Reporting Extension for LearnDash: by WisdmLabs – 3.0.1 WooCommerce Branding: by WooCommerce – 1.0.30 ### Settings ### API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: course (course) 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 ### Shop base: #69 - / Cart: #7 - /cart/ Checkout: #8 - /checkout/ My account: #9 - /my-account/ Terms and conditions: #1700 - /faq/terms-and-conditions/ ### Theme ### Name: Storefront Version: 3.7.0 Author URL: https://woocommerce.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: – ### Action Scheduler ### Canceled: 1 Oldest: 2021-07-21 12:49:37 -0500 Newest: 2021-07-21 12:49:37 -0500 Complete: 592 Oldest: 2021-07-19 21:23:58 -0500 Newest: 2021-07-22 20:27:33 -0500 ### Status report information ### Generated at: 2021-07-22 20:32:26 -05:00