Skip to content

Incorrect Customer TAX Class saved with Quote when VAT Validation used on Guest orders #30018

Closed
@gwharton

Description

@gwharton

Preconditions (*)

  1. 2.4-develop core

Steps to reproduce (*)

- BACKEND

-- Catalog -> Products -> Add Product
--- Name = Test
--- Sku = TEST
--- Price = 100
--- Tax Class = Taxable Goods
--- Qty = 100
--- Save & Close

-- Stores -> Tax Zones and Rates -> Add New Tax Rate
--- Tax Identifier = Ireland Zero Rate
--- Zip Postcode = *
--- Country = Ireland 
--- Rate = 0
--- Save Rate

-- Stores -> Tax Rules -> Add New Tax Rule
--- Name = Ireland Zero Rate
--- Tax Rate = Ireland Zero Rate
--- Additional Settings
---- Add New Tax Class
----- Domestic
---- Add New Tax Class
----- VAT Error
---- Add New Tax Class
----- Invalid VAT
---- Add New Tax Class
----- Intra EU
--- Customer TAX Class = Intra EU (Deselect all others)
--- Save

-- Customers -> Customer Group -> Add New Customer Group
--- Group Name = Domestic
--- Tax Class = Domestic
--- Save Customer Group

-- Customers -> Customer Group -> Add New Customer Group
--- Group Name = Invalid VAT
--- Tax Class = Invalid VAT
--- Save Customer Group

-- Customers -> Customer Group -> Add New Customer Group
--- Group Name = VAT Error
--- Tax Class = VAT Error
--- Save Customer Group

-- Customers -> Customer Group -> Add New Customer Group
--- Group Name = Intra EU
--- Tax Class = Intra EU
--- Save Customer Group

-- Store -> Configuration -> Customers -> Customer Configuration -> Create new account options
--- Enable Automatic Assignment to Customer Group = Yes
--- Tax Calculation Based On = Shipping Address
--- Group for Valid VAT ID - Domestic = Domestic
--- Group for Valid VAT ID - Intra-Union = Intra EU
--- Group for Invalid VAT ID = Invalid VAT
--- Validation Error Group = VAT Error
--- Validate on Each Transaction = Yes
--- Show VAT Number on Storefront = Yes
--- Save Config

-- Store -> Configuration -> Customers -> Customer Configuration -> Name and Address Options
--- Show Tax/VAT Number = Optional
--- Save Config

-- Store -> Configuration -> General -> General -> Store Information
--- Country = United Kingdom
--- VAT Number = GB782325424 (This is ebay UK's vat number)
--- Validate VAT Number
--- Save Config

- FRONTEND

-- go to /test.html
-- Add 1 item to cart

- MYSQL

-- Review tax_class table and familiarise yourself with tax class id's and group names
-- Inspect quote table and check customer_tax_class_id field of new quote item. 
-- It should match to "Retail Customer" Group.

- FRONTEND

-- Minicart -> Proceed to checkout
-- Email = [email protected]
-- First Name = Test
-- Last Name = Test
-- Street Address = Test
-- Country = Ireland
-- City = Test
-- Phone Number = 12345
-- VAT Number = IE3206488LH (This is Stripe IE's VAT Number)
-- Next
-- Wait for payment Page to show

- MYSQL
-- Inspect quote table and check customer_tax_class_id field of quote item. 
-- It should match to "Intra-EU" Group.

- FRONTEND
-- Place Order

- MYSQL
-- Inspect quote table and check customer_tax_class_id field of quote item. 
-- It should match to "Intra-EU" Group. It is not. It has changed back to "Retail Customer"

Expected result (*)

  1. I expect the quote item corresponding to the order to have the correctly assigned Customer Tax Class of "Intra-EU" after the order is placed

Actual result (*)

  1. The Customer Tax Class is set to Intra-EU at the quote stage, but is overwritten with "Retail Customer" once the order is placed.

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: QuoteComponent: TaxIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions