generate random UE-NIF

This handler return a random UE “Número de Identificación Fiscal” and is easily adaptable to create a UE-NIF validation routine.

OS version: Any

generateRandomNIF_UE()

on generateRandomNIF_UE()
	set letras to "TRWAGMYFPDXBNJZSQVHLCKET"
	set thenum to random number from 1 to 9999999
	set theindex to (thenum mod 23) + 1
	"X" & thenum & letras's item theindex as string
end generateRandomNIF_UE