-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
New Feature Faker::CIF #929
Comments
It looks like the possible sequences are |
@PuZZleDucK I'm not sure if that's the only thing. I don't speak Spanish but since Portuguese is really close, I could understand what the website said but not what CIF is. I think it has a validation number somehow... I'll try to find more information |
lol... I was thinking it could be more appropriate as a localization of "Account number" or something similar rather than a whole new thing. I'm sure the other two IDs are DNI and NIE as referenced in #872 |
CIF is a sequence used to identify a company in our tax system. It seems NIF is like a CIF 2.0. Wikipedia: https://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal |
Ok, from trying to comprehend auto-translated info it seems the first letter is one of "ABCDEFGHJNPQRSUVW". Then two digit combinations for region (a set of sequences listed in the reference from @Elolawyn above) Then a five digit identifier (I'd propose totally random) The final character is a checksum sorta thing.
Anyone thinks this sounds right-enough to run with? |
lol... gafaw... and facepalm :p I was looking for a good place to put this when I stumbled upon |
|
These "CIF"s are not specific to Spain only, and are more commonly known as VAT numbers (in the EU). You can find more info here. No validation formula though. |
It says the number generation is delegated to each nation... so I don't think we could generalize the Spanish formula to other countries... although many might be similar 🤞 VAT also seems to have a country specific prefix which this does not have... so a Spanish CIF would have a prefix when expressed as a VAT... so "1234567X" might be "SP1234567X" when written as a VAT (note, not sure if Spains prefix is SP or not, just a hypothetical value) |
@PuZZleDucK PRs merged successfully. Thanks for contributing 🥇 |
I'd like to be able to create valid spanish CIFs like in http://generadordni.es/. I think they are called VAT in other countries.
The text was updated successfully, but these errors were encountered: