Skip to content

[Backport] Fixes incorrect country code being used for Greek VAT numbers, should… #21169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

amol2jcommerce
Copy link
Contributor

Original Pull Request

#20548
… be 'EL' instead of 'GR'.

Description (*)

Greek VAT numbers use the prefix 'EL' and not the normal country code 'GR'.
This VAT number is send to the VIES VAT number validation and currently in Magento, the validation of Greek VAT numbers just never works. This PR fixes this.

Quoting from wikipedia:

The full identifier starts with an ISO 3166-1 alpha-2 (2 letters) country code (except for Greece, which uses the ISO 639-1 language code EL for the Greek language, instead of its ISO 3166-1 alpha-2 country code GR)

Fixed Issues (if relevant)

  1. Greek vat numbers cannot be validated #6960: Greek vat numbers cannot be validated

Manual testing scenarios (*)

In admin:

  1. In admin, go to Stores > Configuration > General > General > Store Information
  2. Make sure you select Greece as country and enter some dummy number "1234"
  3. It is expected that the string EL1234 is send to VIES, right now GR1234 is getting send

In frontend:

  1. First in admin, make sure these configurations are setup in Stores > Configuration > Customers > Customer Configuration > Create New Account Options:
    • Enable Automatic Assignment to Customer Group => Yes
    • Tax Calculation Based On => Yes
    • Group for Valid VAT ID - Domestic => General (doesn't really matter in this case)
    • Group for Valid VAT ID - Intra-Union => General (doesn't really matter in this case)
    • Group for Invalid VAT ID => General (doesn't really matter in this case)
    • Validation Error Group => General (doesn't really matter in this case)
    • Validate on Each Transaction => Yes
    • Show VAT Number on Storefront => Yes
  2. Flush caches
  3. On frontend, create a new account
  4. While logged in, create a new address and select Greece as a country, and enter some dummy VAT number "1234"
  5. It is expected that the string EL1234 is send to VIES, right now GR1234 is getting send

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @amol2jcommerce. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-4232 has been created to process this Pull Request

@ghost
Copy link

ghost commented Feb 13, 2019

Hi @amol2jcommerce, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

magento-engcom-team pushed a commit that referenced this pull request Feb 13, 2019
@sidolov sidolov added this to the Release: 2.2.9 milestone Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants