Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2024-06-23 16:12:59 +0200
committerArthur de Jong <arthur@arthurdejong.org>2024-06-23 16:18:19 +0200
commite951daca447f678f5a3f3c70dcc535eb8d7449b4 (patch)
treec4d2b13049a3389164db62dad4364f89fa7e7904 /tests
parent1da003f4523369d982ad923e6ad5c3093dac298b (diff)
Support 16 digit Indonesian NPWP numbers
The Indonesian NPWP is being switched from 15 to 16 digits. The number is now the NIK for Indonesian citizens and the old format with a leading 0 for others (organisations and non-citizens). See https://www.grantthornton.co.id/insights/global-insights1/updates-regarding-the-format-of-indonesian-tax-id-numbers/ Closes https://github.com/arthurdejong/python-stdnum/issues/432
Diffstat (limited to 'tests')
-rw-r--r--tests/test_id_npwp.doctest11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_id_npwp.doctest b/tests/test_id_npwp.doctest
index 13a78d9..621aa53 100644
--- a/tests/test_id_npwp.doctest
+++ b/tests/test_id_npwp.doctest
@@ -1,6 +1,7 @@
test_id_npwp.doctest - more detailed doctests for stdnum.id.npwp module
Copyright (C) 2020 Leandro Regueiro
+Copyright (C) 2024 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -49,6 +50,16 @@ Traceback (most recent call last):
InvalidChecksum: ...
+Since 2024 the numbers have been changed to a 16 digit format. They can
+either be a NIK (for Indonesian citizens) or a 0 followed by the original
+15-digit number.
+
+>>> npwp.validate('3171011708450001') # NIK
+'3171011708450001'
+>>> npwp.validate('083.132.665.7-201.000') # extra 0 prepended
+'0831326657201000'
+
+
These have been found online and should all be valid numbers.
>>> numbers = '''