From 855fa7563365daa31f33aa9caf807989621e672a Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 17 May 2024 09:34:55 +0200 Subject: [PATCH 1/2] Support both corporate and individual Israeli TINs for generic validation According to the official references mentioned in #107, Israeli companies can use two types of Tax Identification Numbers / VAT codes: - Corporate Registration Numbers for corporations, as currently implemented by `stdnum.il.hp` - ID Card numbers for sole proprietorship businesses (individuals), as currently implemented by `stdnum.il.idnr` For example, the [TIN rules that were provided to OECD by the Israeli tax administration](https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Israel-TIN.pdf) state: > The "TIN" for an Individual is his ID number. 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 that `stdnum.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 the `stdnum.il.hp` one verifies that the first digit is 5. --- stdnum/il/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdnum/il/__init__.py b/stdnum/il/__init__.py index b002751c..62ddd267 100644 --- a/stdnum/il/__init__.py +++ b/stdnum/il/__init__.py @@ -21,4 +21,4 @@ """Collection of Israeli numbers.""" # provide aliases -from stdnum.il import hp as vat # noqa: F401 +from stdnum.il import idnr as vat # noqa: F401 From 2fdbb7ce1f93c63281a4bb16c441e88e74ca09c3 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 17 May 2024 10:21:19 +0200 Subject: [PATCH 2/2] Fix python3.5 test failure with workaround for actions/setup-python/issues/868 --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8409a9ee..4b382a0d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,6 +35,8 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + env: + PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org" - name: Install dependencies run: python -m pip install --upgrade pip tox - name: Run tox