-
Notifications
You must be signed in to change notification settings - Fork 4
getGlobalIdentifier
elcapo edited this page Oct 16, 2014
·
9 revisions
This "global identifier" refers to the code AT-02 created for the C19.14. The C19.14 is a temporary file format to be used in Spain until the ISO 20022 XML format is finally adopted.
If the IBAN is built by adding a few digits to the national bank accounts, the AT-02 is build by adding digits to the national identifier. In the case of Spain, this identifiers are NIFs, NIEs and CIFs.
For instance, the Spanish CIF G28667152, can be expressed internationally as ES03000G28667152.
In order to properly run the algorithm that prepares the string and calculates the check digits, this function uses replaceLetterWithDigits
and replaceCharactersNotInPattern
.
- The translations for this function are available at JavaScript, MySQL and PHP.
- The tests are available at JavaScript, MySQL and PHP.
-
[string]
- International version of the identification number. - `` - Otherwise.
/* MySQL */
SELECT getGlobalIdentifier( 'G28667152', 'ES', '' ); /* Returns ES03000G28667152 */
/* JavaScript */
var globalId = getGlobalIdentifier( 'G28667152', 'ES', '' ); /* globalId = ES03000G28667152 */
/* PHP */
$globalId = getGlobalIdentifier( 'G28667152', 'ES', '' ); /* $globalId = ES03000G28667152 */
Go back home!
SEPA validations
- [International Bank Account Numbers (IBAN)](International Bank Account Numbers (IBAN))
Spanish validations
- NIF, NIE & CIF
- [Spanish Bank Accounts](Spanish Bank Accounts)
Helpers
- [Common functions](Common functions)