Skip to content
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

Add support for United Kingdom (Northern Ireland) ("GB-NIR") #127

Closed
jonathanmaron opened this issue Jan 5, 2021 · 7 comments
Closed

Add support for United Kingdom (Northern Ireland) ("GB-NIR") #127

jonathanmaron opened this issue Jan 5, 2021 · 7 comments

Comments

@jonathanmaron
Copy link
Contributor

jonathanmaron commented Jan 5, 2021

In accordance with the agreed Protocol on Ireland and Northern Ireland following Brexit, EU customs rules and procedures generally continue to apply to goods entering and leaving Northern Ireland.

Source: https://ec.europa.eu/taxation_customs/uk_withdrawal_en

We therefore should add support for the "United Kingdom (Northern Ireland)".

Since the new XI VAT numbers for Northern Ireland businesses are just like the GB VAT numbers, we should be able to re-purpose the current GB validator:

Businesses should substitute "XI" country code in their GB VAT number on invoices so that the transactions can be identified separate from UK VAT transactions. So XI 123456789 - instead of GB 123456789.

Source (and other details): https://www.avalara.com/vatlive/en/vat-news/brexit-northern-ireland-vat-and-eoro--xi--number.html

@DragonBe
Copy link
Owner

DragonBe commented Jan 5, 2021

Yes @jonathanmaron, you're absolutely correct. I suggest that before we remove UK completely (#126) we should first look at integrating Northern Ireland correctly.

What I'm missing in the documentation up to this point are the structure definition and which calculation method is being used to verify if this new VAT ID is formatted correctly. Do you have some details about that?

@jonathanmaron
Copy link
Contributor Author

I would agree with you to add "United Kingdom (Northern Ireland)" before we remove "United Kingdom".

The only documentation that I found on the structure of the new XI VAT numbers is at:

https://www.avalara.com/vatlive/en/vat-news/brexit-northern-ireland-vat-and-eoro--xi--number.html

The UK and EU have agreed the above transactions should use the "XI" country code instead of "GB" for VAT numbers on invoices and statistical declarations. [..] Businesses should substitute "XI" country code in their GB VAT number on invoices so that the transactions can be identified separate from UK VAT transactions. So XI 123456789 - instead of GB 123456789. [..] There is no requirement to apply for a new "XI" VAT number. Businesses with NI postcodes will automatically be assumed to be operating within the terms of the NI Protocol.

According to that, we can simply re-purpose the current "United Kingdom" validator.

@DragonBe
Copy link
Owner

DragonBe commented Jan 5, 2021

Yes, this can be done. Do you want to replicate the UK validator for Northern Ireland @jonathanmaron, including the tests?

@jonathanmaron
Copy link
Contributor Author

It would be my pleasure to implement the require classes.

@jonathanmaron
Copy link
Contributor Author

And done. See pull request #128

@jonathanmaron
Copy link
Contributor Author

If you search for some town names in Northern Ireland in the "Enter company name" text entry box at http://www.vat-check.co.uk you can find some real VAT numbers belonging to Northern Ireland businesses. Simply replace "GB" with "XI" for test purposes.

@DragonBe
Copy link
Owner

DragonBe commented Jan 5, 2021

Merged #128 after updating GitHub Action to test against PHP 7.4 as some components are not yet ready for PHP 8 unfortunately.

@DragonBe DragonBe closed this as completed Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants