From e951daca447f678f5a3f3c70dcc535eb8d7449b4 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 23 Jun 2024 16:12:59 +0200 Subject: 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 --- tests/test_id_npwp.doctest | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') 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 = ''' -- cgit v1.2.3