magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.48k stars 9.29k forks source link

Catalog price rule not applied when customer adds VAT number at checkout #35279

Open ludo-mon-key opened 2 years ago

ludo-mon-key commented 2 years ago

We have noticed that if the "Configuring VAT ID Validation" is activated when a user adds a product to the cart to which a catalog rule is applied and enters a VAT number at checkout, the system disapplies the catalog rule.

Preconditions (*)

Magento version 2.4.3-p1

Steps to reproduce (*)

Important: By the way, this is the default issue in both Blank and Luma themes with sample data

  1. in Admin configure the VAT ID Validation following the instructions at the link: https://docs.magento.com/user-guide/tax/vat-validation-configure.html Here are the screenshots: tax-rules

domestic-customer customer-groups domestic-customer-group

  1. Create a catalog rule and apply it to all "Customer Groups" catalog-rule

  2. In Front End, add a product with the catalog rule applied to the cart prodotto

4 Go to Checkout checkout-1

5 In Checkout entered VAT number, in the case of the screenshots we used a domestic VAT number checkout-2

Expected result (*)

The price of the product should have the catalog rule applied, in our case $ 33.60

Actual result (*)

The price of the product is without catalog rule applied, in our case $ 42 checkout-3


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

m2-assistant[bot] commented 2 years ago

Hi @ludo-mon-key. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 2 years ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

ludo-mon-key commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @ludo-mon-key. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @ludo-mon-key, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

ludo-mon-key commented 2 years ago

https://github.com/magento give me 2.4-develop instance

ludo-mon-key commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @ludo-mon-key, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

ludo-mon-key commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @ludo-mon-key. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @ludo-mon-key, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

ludo-mon-key commented 2 years ago

@engcom-Delta no reply? Do you need any other information?

ludo-mon-key commented 2 years ago

@magento-devops give me 2.4-develop instance

ludo-mon-key commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @ludo-mon-key. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @ludo-mon-key, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

engcom-Delta commented 2 years ago

Hi @ludo-mon-key , Thank you for logging an issue , we tried to reproduce the issue on Magento 2.4 develop with latest branch. As per steps provided step#1 says follow dev doc [(https://docs.magento.com/user-guide/tax/vat-validation-configure.html)]

  1. Tax rules in Admin:
Screenshot 2022-04-22 at 6 26 08 PM
  1. As per dev doc [ Store-->Configuration--> Customer--> Customer configuration section ]
Screenshot 2022-04-22 at 6 13 25 PM
  1. Set "Enable Automatic Assignment to Customer Group" field to YES , other fields to default values
Screenshot 2022-04-26 at 7 59 34 PM

4 . Save

  1. Go to Store--> Configuration --> General --> Under store information section and Verify 'Validate VAT Number ' button

in Admin ( Magento 2.4 Develop):

Screenshot 2022-04-22 at 6 22 31 PM

Observe that 'Validate VAT Number ' button is missing.

As per Dev doc[ Button should be available]:

Screenshot 2022-04-22 at 6 19 46 PM

Hence, request to clarify step#1 to replicate the issue.

ludo-mon-key commented 2 years ago

Hi @engcom-Delta , Thanks for the reply. VAT ID validations is specific for EU countries, the Magento guide https://docs.magento.com/user-guide/tax/vat-validation.html says: “VAT ID Validation automatically calculates the required tax for B2B transactions that take place within the European Union (EU), based on the merchant and customer locale. Commerce performs VAT ID validation using the web services of the European Commission server.”

And then it also says

“VAT is charged if the merchant and customer are located in the same EU country. VAT is not charged if the merchant and customer are located in different EU countries, and both parties are EU-registered business entities.”

The UK and the USA are not in the EU.

If you follow step by step the guide and add a European country in admin the VAT validation appears. If it doesn’t appear either you haven’t followed the guide or its a Magento bug.

To complete the steps its important you add a valid VAT number.

To reproduce the error its necessary that you add the tax rule as we described in the description of this problem. We created the tax rules following these instructions: https://docs.magento.com/user-guide/tax/vat-validation-configure.html

In your screenshot we see tax rules for the UK and the USA but not for European countries. If you could verify the problem again, using a European country.

engcom-Delta commented 2 years ago

Hi @ludo-mon-key ,

Thank you for sharing more details and Now we could see the VAT Number field for EU Countries . We are working on EU VAT Number for testing . We will be updating as soon as we get update from regression team.

Thanks

engcom-Delta commented 2 years ago

Hi @ludo-mon-key ,

We have got test data for VAT 571903731 or GB571903731 from other team, These were not working at this movement. we requested the team to provide valid test data and so we will update you soon on this.

Thanks

engcom-Delta commented 2 years ago

Hi @ludo-mon-key , We requested Product Owner @Mak Ghangurde to share valid VAT number for EU countries. it will be retested once hear from him.

engcom-Delta commented 2 years ago

We have noticed that No response from Product Owner and this issue has not been updated for a period of more than 14 Days. Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

ludo-mon-key commented 2 years ago

The problem is not solved, we are waiting for your answer. If you need a valid VAT number we can recover one

engcom-Delta commented 2 years ago

Hi @ludo-mon-key , Many thanks for supporting us , since there was no reply for 14 days we closed it . Kindly share the valid VAT number for EU countries . So that we can retest it and confirm.

Regards,

ludo-mon-key commented 2 years ago

Hi @engcom-Delta, for example, Adobe's European VAT number is: IE6364992H

Regards

engcom-Delta commented 2 years ago

Hi @ludo-mon-key ,

Thank you for providing the required data . We tried to reproduce it on magento 2.4 develop instance , we are not able to reproduce the issue at checkout.

Please find out below screenshots for reference.

  1. Screenshot 2022-06-06 at 7 05 04 PM
  2. Screenshot 2022-06-06 at 5 22 14 PM
  3. Screenshot 2022-06-06 at 7 43 32 PM
  4. Screenshot 2022-06-06 at 7 43 28 PM
  5. Screenshot 2022-06-06 at 7 43 55 PM

Thanks

ludo-mon-key commented 2 years ago

Hi, Thanks for the reply. From what I see from the screenshots it would not seem that the configuration required for VAT ID Validation has been completed in the Backe end: https://docs.magento.com/user-guide/tax/vat-validation-configure.html Have you completed these required steps in detail? Step 1: Create VAT-related customer groups Step 2: Create VAT-related classes, rates, and rules Step 3: Enable and configure VAT ID validation Step 4: Set your VAT ID and location country Step 5: Verify the list of EU member countries

In the screenshots I inserted at the opening of the ticket, there are all the necessary configurations.

If you have entered everything, is it possible to see the screenshots?

Regards

engcom-Delta commented 2 years ago

Hi @ludo-mon-key ,

Here are the required settings . Please have a look and confirm.

Step 1: Create VAT-related customer groups

Screenshot 2022-06-08 at 4 56 51 PM

Step 2: Create VAT-related classes, rates, and rules

Screenshot 2022-06-08 at 4 58 25 PM

Step 3: Enable and configure VAT ID validation

Screenshot 2022-06-08 at 5 00 42 PM Screenshot 2022-06-08 at 5 01 51 PM

Step 4: Set your VAT ID and location country

Screenshot 2022-06-08 at 5 01 51 PM

Step 5: Verify the list of EU member countries

Screenshot 2022-06-08 at 5 05 39 PM
ludo-mon-key commented 2 years ago

Hi @engcom-Delta , Thanks for the reply. I confirm that the configuration is not complete. I would ask you to verify that you have set the tax rules correctly. In the screenshot I don't see the rules for IE which is the VAT number you are using for the tests. The rule for IE must be inserted for “Retail Customer” with value 23%, Intra Union Customers with value 0 and in your case also as Domestic Customer with value 23%. For ease I bring you the screenshots I took: https://user-images.githubusercontent.com/63352341/162250138-e12e2e41-ab4d-4cdf-9fec-c85335911e04.png https://user-images.githubusercontent.com/63352341/162250340-337a01fc-cf3f-46b4-b68b-7e7abbd7f363.png

Also in Step 3: Enable and configure VAT ID validation the user groups must be correctly associated, I see that no one is associated

Schermata 2022-06-08 alle 16 07 50

If necessary, if you have a private email, I can pass you the link to our test area, so you can check

Regards

engcom-Delta commented 2 years ago

Hi @ludo-mon-key ,

Sorry for causing inconvenience, even after several times verification on Magento 2.4 develop latest branch , issue is not reproducible. discounted price only displayed during checkout .

Screenshot 2022-06-10 at 6 05 41 PM

Checkout Page

Screenshot 2022-06-10 at 5 58 52 PM

It would be great help if you can pass the link ( test area) to email id# glo11468@adobe.com

Thanks

ludo-mon-key commented 2 years ago

Hi, thanks. I emailed you the link to the test area

Thanks Regards

engcom-Delta commented 2 years ago

Hi @ludo-mon-key ,

Thank you sharing the test bed . We tried to reproduce the issue , issue is reproducible with Guest user on provided test area. we have observed that it works fine for registered user. Kindly refer the attached video and confirm us.

Guest user: https://www.loom.com/share/a4c1fc159f3e41cfb969a2f81a4500fe

Registered user: https://www.loom.com/share/d90056ead272426fb925816fb6e25bf0

ludo-mon-key commented 2 years ago

Hi, Thanks for the reply. For the registered user I see that it correctly calculates the price of the product, but adds taxes. The taxes instead should be zero according to the tax rule for the IE "Intra Union Customers": Schermata 2022-06-13 alle 18 15 24

Regards

engcom-Delta commented 2 years ago

Hi @ludo-mon-key ,

Thank you for quick turnaround , issue has been confirmed as it is able to reproduce it. Regards,

engcom-Hotel commented 2 years ago

@engcom-Delta We need to reverify this issue in our local instance. Moving this issue in Ready for confirmation.

engcom-Delta commented 2 years ago

Hi @engcom-Hotel, Issue has been verified on local instance magento 2.4.3-p1 & 2.4 develop instance, issue is reproducible . Hence issue is confirmed.

Reference video( Magento 2.4.3-p1) : https://www.loom.com/share/d159579fea6e407a97b44c1711af3a02

Reference video ( Magento 2.4- develop instance )
https://www.loom.com/share/d88a8547c3544bed87abab81274c0e60

Thanks

github-jira-sync-bot commented 2 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-5975 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 years ago

:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.