tax library

National Tax Number (NTN) and Sales Tax Registration Number (STRN) checks.

Same as the pakdatakit/tax entry point of the npm package.

Classes

NTNInfo
What analyzeNTN reads from a National Tax Number: the kind of taxpayer, the digits and the usual display form.

Enums

NTNType
Kind of taxpayer a National Tax Number belongs to: individual when the NTN is a 13-digit CNIC, business for a company's or association's 7-digit NTN.

Functions

analyzeNTN(String ntn) → NTNInfo?
Analyzes a Pakistani National Tax Number (NTN): a 13-digit CNIC for individuals, or 7 digits (optionally followed by a check digit) for businesses.
validateNTN(String ntn) → bool
Validates the format of a Pakistani National Tax Number. See analyzeNTN.
validateSTRN(String strn) → bool
Validates the format of a Sales Tax Registration Number (STRN): 13 digits, with optional spaces or dashes.