dolibarr 20.0.2
|
Set of functions for professional identifiers. More...
Go to the source code of this file.
Functions | |
isValidLuhn ($str) | |
Check if a string passes the Luhn algorithm test. | |
isValidSiren ($siren) | |
Check the syntax validity of a SIREN. | |
isValidSiret ($siret) | |
Check the syntax validity of a SIRET. | |
isValidTinForPT ($str) | |
Check the syntax validity of a Portuguese (PT) Tax Identification Number (TIN). | |
isValidTinForDZ ($str) | |
Check the syntax validity of an Algerian (DZ) Tax Identification Number (TIN). | |
isValidTinForBE ($str) | |
Check the syntax validity of a Belgium (BE) Tax Identification Number (TIN). | |
isValidTinForES ($str) | |
Check the syntax validity of a Spanish (ES) Tax Identification Number (TIN), where: | |
Set of functions for professional identifiers.
Definition in file profid.lib.php.
isValidLuhn | ( | $str | ) |
Check if a string passes the Luhn algorithm test.
string | int | $str | string to check |
Definition at line 33 of file profid.lib.php.
References dol_strlen().
Referenced by isValidSiren(), and isValidSiret().
isValidSiren | ( | $siren | ) |
Check the syntax validity of a SIREN.
string | $siren | SIREN to check |
Definition at line 59 of file profid.lib.php.
References dol_strlen(), and isValidLuhn().
Referenced by Societe\id_prof_check().
isValidSiret | ( | $siret | ) |
Check the syntax validity of a SIRET.
string | $siret | SIRET to check |
Specific case of "La Poste" businesses (SIRET such as "356 000 000 XXXXX"), for which the rule becomes: the sum of the 14 digits must be a multiple of 5. See https://fr.wikipedia.org/wiki/SIRET for details.
Definition at line 79 of file profid.lib.php.
References dol_strlen(), and isValidLuhn().
Referenced by Societe\id_prof_check().
isValidTinForBE | ( | $str | ) |
Check the syntax validity of a Belgium (BE) Tax Identification Number (TIN).
(NN = Numéro National)
string | $str | NN to check |
Definition at line 153 of file profid.lib.php.
Referenced by Societe\id_prof_check().
isValidTinForDZ | ( | $str | ) |
Check the syntax validity of an Algerian (DZ) Tax Identification Number (TIN).
(NIF = Numéro d'Identification Fiscale)
string | $str | TIN to check |
Definition at line 132 of file profid.lib.php.
Referenced by Societe\id_prof_check().
isValidTinForES | ( | $str | ) |
Check the syntax validity of a Spanish (ES) Tax Identification Number (TIN), where:
string | $str | TIN to check |
Definition at line 177 of file profid.lib.php.
Referenced by Societe\id_prof_check().
isValidTinForPT | ( | $str | ) |
Check the syntax validity of a Portuguese (PT) Tax Identification Number (TIN).
(NIF = Número de Identificação Fiscal)
string | $str | NIF to check |
Definition at line 111 of file profid.lib.php.
Referenced by Societe\id_prof_check().