XV-MY-16
A Malaysian TIN is IG and digits for an individual; for others C, CS, D, F, FA, PT, TA, TC, TN, TR, TP, J or LE, then digits without a leading zero, ending with 0; at most 14 characters. The …'s TIN, …, is not in that form.
Why it fails
- A TIN with the old individual prefix OG or SG, now IG.
- A non-individual TIN with a zero after the prefix (C01234567890), or without the zero LHDN now adds at the end (C123456789).
How to fix it
Check the TIN with LHDN's Search TIN function, and write it as it gives it: C1234567890 for C01234567890 or C123456789.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
/*/cac:AccountingSupplierParty/cac:Party | /*/cac:AccountingCustomerParty/cac:Party
$tin = '' or $general or (string-length($tin) le 14 and matches($tin, '^(IG[0-9]+|(C|CS|D|F|FA|PT|TA|TC|TN|TR|TP|J|LE)[1-9][0-9]*0)$'))
Checked with MyInvois e-Invoice