-
Notifications
You must be signed in to change notification settings - Fork 59
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
Allow MOSS-registered non-EU companies to be used as requester #82
Conversation
To be honest, I didn't look into this as "EU" prefix was not mentioned in the list for validating VAT ID's on de EC website (see http://ec.europa.eu/taxation_customs/vies/faqvies.do#item_11). I did a quick search online to figure out the "format" for such a MOSS VAT ID, but it seems to be just the prefix "EU" and then the number format for the country where it was registered (this is just an assumption as I can't find a document describing the correct format yet). I haven't seen any use cases where this MOSS was used, do you have some examples @Seldaek? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add EU
to VIES_EU_COUNTRY_LIST
we are not increasing complexity in the code and require no additional testing for this complexity.
As I cannot find the "format" description for EU MOSS VAT ID's I would like to know what validation rules we need to apply here.
@DragonBe it's only allowed in the requester field and it seems VIES is validating the number in some way, but I was unable to find any information how it's validated and is there any algorithm to validate it. |
Found this document: https://ec.europa.eu/taxation_customs/sites/taxation/files/resources/documents/taxation/vat/how_vat_works/telecom/one-stop-shop-guidelines_en.pdf To follow format: EUxxxyyyyyz where: xxx is the 3 digit ISO numeric of the Member State of |
This seems to be the ISO numeric codes: https://en.wikipedia.org/wiki/ISO_3166-1_numeric#Officially_assigned_code_elements |
Valid EU-MOSS EU528003555 |
@krzaczek that format info seems to be correct with what we got, we registered for MOSS in Ireland (as a Swiss company we have no EU VAT number) - we have EU372 (ireland) then six digits. I don't know if it brings so much to validate this in the library though as the requester VAT is a hardcoded value you set for your company it's very unlikely to be wrong or if it is the API call will fail quickly.. |
@DragonBe we could add EU to VIES_EU_COUNTRY_LIST but we should also create a validator for it that should fail always .. so that passing EU vat to We need to create a dummy validator that always returns false for EUxxxyyyyyz |
I found the check digit algorithm. It's a simple weightSum with [8, 7, 6, 5, 4, 3, 2, 1] multipliers. I was able to validate 4 EU numbers found through the internet EU372009975 We actually don't need it :) but was not able to let it go :) heheheh |
@krzaczek if you wanna take over the PR be my guest :) |
@Seldaek sure .. i'll try to send changes today - but in the evening :) |
closing -> new MR #85 |
Kinda amazed this hasn't come up yet, I guess the compliance levels aren't as high as they should be :D
Anyway, non EU companies registering for MOSS get a EUxxxxx VAT number, so we need to be able to put that in the requester VAT ID. For reference, http://ec.europa.eu/taxation_customs/vies/ allows you to input "EU-MOSS Number" in the requester member state.