arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
499 stars 208 forks source link

Add vat alias so stdnum.vatin works for the United States #324

Closed unho closed 1 year ago

unho commented 2 years ago

While stdnum provides several modules implementing some sort of TIN for the United States, EIN is the only only used for companies and institutions.

arthurdejong commented 1 year ago

I'm pretty sure the US does not have the concept of VAT but they have sales tax instead: https://en.wikipedia.org/wiki/Value-added_tax#United_States

Closing this for now. We may want to introduce something along the lines of validation of any valid TIN but that can get complicated pretty fast and which kind of identifiers are appropriate is most likely very application-dependant.

unho commented 1 year ago

@arthurdejong The validation of any valid TIN is provided by stdnum.vatin module, which relies on these vat aliases. So this PR was just adding this tiny change to make sure these module was able to validate TIN numbers for the United States.

If you prefer we can instead use a different alias, but then we will have to review all the countries to untagle the VAT number and TIN number, if that is even possible. Not to mention that this will break third party software like Odoo.