Open pokoli opened 4 years ago
Hi @pokoli,
Thanks for looking into this.
The OECD document is pretty unclear but regarding the length it talks about maximum lengths so the actual numbers may be shorter (e.g. "SG 587682020"). The maximum total length appears to be 13 (e.g. "SG 10234567090" is valid).
It may be better to not split on length but split on non-digit and digit parts and check the parts.
These appear to also be links with useful information:
It would be really nice if we could find a list of number types somewhere (the document has a table with categories that mention SG, OG, C, CS, D, E, F, FA, PT, TA, TC, TN, TR, TP, TJ annd LE but in other places TF is also mentioned).
I've got some feedback from our users that recieved a number 552815-W
of company in Malaysia but the number does not match any of the specified numbers. I've checked on the net and the company exists.
This is strange
It cloud be that "552815-W" is a registration number (perhaps with something like a chamber of commerce) and not a tax number. It would really be helpful to have good documentation on Malaysian numbers or someone with local knowledge.
I don't see any tests.
This PR implements what is described on #113
I did not found so much information of the number so it is based on:
http://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Malaysia-TIN.pdf
I will complete the tests with all of the numbers of this source document plus a real number example which I am waiting to receive from some of our users.