|
dolibarr 24.0.0-beta
|
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, $lengthonly=0) | |
| Check the syntax validity of a SIREN. | |
| isValidSiret ($siret, $lengthonly=0) | |
| 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: | |
| isValidProfIds ($idprof, $thirdparty, $lenghtonly=0) | |
| Check the validity of a professional identifier according to the properties (country) of the company (siren, siret, ...) | |
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(), and string.
Referenced by isValidSiren(), and isValidSiret().
| isValidProfIds | ( | $idprof, | |
| $thirdparty, | |||
| $lenghtonly = 0 ) |
Check the validity of a professional identifier according to the properties (country) of the company (siren, siret, ...)
| int | $idprof | 1,2,3,4 (Example: 1=siren, 2=siret, 3=naf, 4=rcs/rm) |
| Societe | $thirdparty | Object societe |
| int | $lenghtonly | Make surface test only (length, ...) |
Definition at line 261 of file profid.lib.php.
References getDolGlobalString(), isValidSiren(), isValidSiret(), isValidTinForBE(), isValidTinForDZ(), isValidTinForES(), and isValidTinForPT().
Referenced by Societe\id_prof_check().
| isValidSiren | ( | $siren, | |
| $lengthonly = 0 ) |
Check the syntax validity of a SIREN.
| string | $siren | SIREN to check |
| int | $lengthonly | Make surface test only (length, ...) |
Definition at line 60 of file profid.lib.php.
References dol_strlen(), and isValidLuhn().
Referenced by isValidProfIds().
| isValidSiret | ( | $siret, | |
| $lengthonly = 0 ) |
Check the syntax validity of a SIRET.
| string | $siret | SIRET to check |
| int | $lengthonly | Make surface test only (length, ...) |
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 81 of file profid.lib.php.
References dol_strlen(), and isValidLuhn().
Referenced by isValidProfIds().
| 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 155 of file profid.lib.php.
Referenced by isValidProfIds().
| 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 134 of file profid.lib.php.
Referenced by isValidProfIds().
| isValidTinForES | ( | $str | ) |
Check the syntax validity of a Spanish (ES) Tax Identification Number (TIN), where:
| string | $str | TIN to check |
Definition at line 179 of file profid.lib.php.
Referenced by isValidProfIds().
| 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 113 of file profid.lib.php.
Referenced by isValidProfIds().