Open odony opened 1 month ago
@arthurdejong it make look like a stretch to use the idnr
algorithm to validate the hp
ones too, in case they later diverge. Perhaps you'd prefer having an actual stdnum.il.vat
that explicitly tries both hp
and idnum
in sequence?
PS: the test_legacy (3.5)
failure seems caused by the this issue in the setup-python GH action
According to the official references mentioned in #107, Israeli companies can use two types of Tax Identification Numbers / VAT codes:
stdnum.il.hp
stdnum.il.idnr
For example, the TIN rules that were provided to OECD by the Israeli tax administration state:
Based on these references, it seems that the validation of a generic VAT number for Israel via
stdnum.il.vat
should allow both formats.Further, considering that
stdnum.il.idnr
is a simple luhn validation that will also work for the numbers thatstdnum.il.hp
currently verifies, this can be done by simply changin the default alias to point to it instead. The only difference between the two algorithms is that thestdnum.il.hp
one verifies that the first digit is 5.