se-panfilov / jsvat

Check the validity of the format of an EU VAT number
http://se-panfilov.github.io/jsvat
MIT License
131 stars 34 forks source link

Incorrect VAT validation for Poland when total sum modulo with 11 is 10 #131

Open banafsheh-unify opened 2 years ago

banafsheh-unify commented 2 years ago

It seems there is an issue with VAT validation for Poland. According to this wikipedia page (https://pl.wikipedia.org/wiki/Numer_identyfikacji_podatkowej) and the spec here (https://romek.info/ut/nip-rego.html#nip) the following numbers are invalid VAT numbers:

TShockman commented 1 year ago

At least one issue occurs when checksum mod 11 is 10, according to the spec this should indicate an invalid VAT number. An english version of the specs can be found here https://ec.europa.eu/taxation_customs/tin/#/check-tin (download file under "Get the TIN specifications", page 42).

This is the case with VAT number 1234567890.