woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
301 stars 109 forks source link

[Woo POS] Order total calculations ignore "Prices entered with tax" settings #13324

Closed staskus closed 3 months ago

staskus commented 3 months ago

Describe the bug

When Prices entered with tax: Yes, I will enter prices inclusive of tax tax setting is enabled, iOS POS mode still treats all product prices as pre-tax, resulting in a wrong Order Totals calculation.

To Reproduce Steps to reproduce the behavior:

  1. Enable Yes, I will enter prices inclusive of tax (WooCommerce -> Settings -> Tax -> Prices entered with tax)
  2. Enter POS mode
  3. Add a product
  4. Check out
  5. Notice that the order total adds a tax on top of the tax-inclusive product

Screenshots

POS IPP
image 1 image 2

Expected behavior

Order Totals on POS should be calculated taking Yes, I will enter prices inclusive of tax setting into consideration.

Isolating the problem (mark completed items with an [x]):

Mobile Environment Please include:

WordPress Environment

``` ` ### WordPress Environment ### WordPress address (URL): https://testpovilasstore.mystagingwebsite.com Site address (URL): https://testpovilasstore.mystagingwebsite.com WC Version: 9.1.1 Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site. Action Scheduler Version: ✔ 3.7.4 Log Directory Writable: ✔ WP Version: 6.5.5 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: ✔ ### Server Environment ### Server Info: nginx PHP Version: 8.2.21 PHP Post Max Size: 2 GB PHP Time Limit: 1200 PHP Max Input Vars: 6144 cURL Version: 8.7.1 OpenSSL/3.0.13 SUHOSIN Installed: – MySQL Version: 10.6.18-MariaDB-log Max Upload Size: 2 GB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 9.0.2 WC Database Prefix: wp_ Total Database Size: 5.08MB Database Data Size: 2.56MB Database Index Size: 2.52MB wp_woocommerce_sessions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.20MB + Index: 0.20MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.19MB + Index: 0.22MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.14MB + Index: 0.13MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.13MB + Index: 0.09MB + Engine InnoDB wp_jetpack_sync_queue: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 0.36MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 0.14MB + Index: 0.11MB + Engine InnoDB wp_posts: Data: 0.11MB + Index: 0.06MB + Engine InnoDB wp_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.09MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_orders: Data: 0.05MB + Index: 0.11MB + Engine InnoDB wp_wc_orders_meta: Data: 0.08MB + Index: 0.13MB + Engine InnoDB wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_bundle_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_operational_data: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.05MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_bundled_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### attachment: 29 page: 7 post: 1 product: 25 product_variation: 11 shop_coupon: 4 shop_order_placehold: 146 wp_navigation: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (16) ### Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.3 Bulk Discounts for WooCommerce: by Plugify – 2.0.2 (update to version 2.0.3 is available) Code Snippets: by Code Snippets Pro – 3.6.5.1 Jetpack Protect: by Automattic - Jetpack Security team – 2.2.0 Jetpack: by Automattic – 13.7-a.1 Product Bundle Discount: by Codup – 1.1.4.1 Smart Product Quantity: by HighAddons – 1.0.6 Woo All Products For Subscriptions: by Woo – 5.0.5 (update to version 5.0.7 is available) WooCommerce Beta Tester: by WooCommerce – 2.3.1 WooCommerce Stripe Gateway: by WooCommerce – 8.4.0 WooCommerce Payments Dev Tools: by Automattic – WooPayments: by Automattic – 7.8.1 (update to version 7.9.1 is available) Woo Product Bundles: by Woo – 7.2.0 WooCommerce Stripe Dev Tools: by – WooCommerce Subscriptions: by WooCommerce – 6.4.1 WooCommerce: by Automattic – 9.1.1 (update to version 9.1.2 is available) ### Inactive Plugins (0) ### ### Dropin Plugins () ### advanced-cache.php: advanced-cache.php object-cache.php: Memcached ### Settings ### API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: bundle (bundle) external (external) grouped (grouped) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription) 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: – Enforce Approved Product Download Directories: ✔ HPOS feature enabled: ✔ Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore HPOS data sync enabled: – ### Logging ### Enabled: ✔ Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2 Retention period: 30 days Level threshold: – Log directory size: 5 MB ### WC Pages ### Shop base: #9 - /shop/ Cart: #10 - /cart/ - Contains the woocommerce/cart block Checkout: #11 - /checkout/ - Contains the woocommerce/checkout block My account: #12 - /my-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: Twenty Twenty-Four Version: 1.1 Author URL: https://wordpress.org 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: ❌ Not declared ### Templates ### Overrides: /srv/htdocs/wp-content/plugins/woocommerce/templates/block-notices/error.php /srv/htdocs/wp-content/plugins/woocommerce/templates/block-notices/notice.php /srv/htdocs/wp-content/plugins/woocommerce/templates/block-notices/success.php ### WooPayments ### Version: 7.8.1 Connected to WPCOM: Yes WPCOM Blog ID: 234565615 Account ID: acct_1PVtvXC2Xmo7UoLK Payment Gateway: Enabled Test Mode: Enabled Enabled APMs: card WooPay: Enabled (product,cart,checkout) WooPay Incompatible Extensions: No Apple Pay / Google Pay: Enabled (product,cart,checkout) Fraud Protection Level: basic Multi-currency: Enabled Auth and Capture: Enabled Documents: Disabled Logging: Enabled ### Subscriptions ### WCS_DEBUG: ✔ No Subscriptions Mode: ✔ Live Subscriptions Live URL: https://testpovilasstore.mystagingwebsite.com Subscriptions-core Library Version: 7.2.0 Subscription Statuses: – WooCommerce Account Connected: ❌ No Report Cache Enabled: ✔ Yes Cache Update Failures: ✔ 0 failure ### Store Setup ### Country / State: United States (US) — New York ### Subscriptions by Payment Gateway ### ### Payment Gateway Support ### WooPayments: products refunds multiple_subscriptions subscription_cancellation subscription_payment_method_change_admin subscription_payment_method_change_customer subscription_payment_method_change subscription_reactivation subscription_suspension subscriptions subscription_amount_changes subscription_date_changes tokenization add_payment_method Cash on delivery: products Stripe: products refunds tokenization add_payment_method subscriptions subscription_cancellation subscription_suspension subscription_reactivation subscription_amount_changes subscription_date_changes subscription_payment_method_change subscription_payment_method_change_customer subscription_payment_method_change_admin multiple_subscriptions ### Product Bundles ### Database Version: 7.2.0 Loopback Test: – Template Overrides: – ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customize-store 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-custom-fields 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 launch-your-store Disabled Features: experimental-blocks minified-js pattern-toolkit-full-composability product-pre-publish-modal printful settings async-product-editor-category-field product-editor-template-system beta-tester-slotfill-examples Daily Cron: ✔ Next scheduled: 2024-07-15 19:15:11 +00:00 Options: ✔ Notes: 75 Onboarding: skipped ### All Products for Woo Subscriptions ### Template Overrides: – ### Action Scheduler ### Canceled: 9 Oldest: 2024-07-02 08:15:21 +0000 Newest: 2024-07-12 06:41:10 +0000 Complete: 514 Oldest: 2024-06-27 19:16:15 +0000 Newest: 2024-07-15 07:15:05 +0000 Failed: 2 Oldest: 2024-06-27 19:19:28 +0000 Newest: 2024-06-28 08:05:06 +0000 Pending: 1 Oldest: 2024-07-15 12:39:26 +0000 Newest: 2024-07-15 12:39:26 +0000 ### Status report information ### Generated at: 2024-07-15 09:14:02 +00:00 ` ```
dangermattic commented 3 months ago

Thanks for reporting! 👍

staskus commented 3 months ago

This could be related to the issue of passing wrong info to API, same happened on Android before: