Skip to content

Validación digito de verificacion de la DIAN. Calculo basado en el algoritmo de modulo 11.

License

Notifications You must be signed in to change notification settings

HanselMRojas/modulo-11

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digito de verficacion DIAN

Este modulo sireve para calcular el digito de verificación de un NIT o RUT de la entidad Tributaria DIAN en Colombia.

Ejemplo Básico

El siguiente ejemplo solo es de uso didáctico. Tomamos como ejemplo un NIT empresarial econtrado al azar. En este caso el de Cocacola FEMSA Colombia.

	
/** ES2015: */
import modulo from 'modulo-11'

/** ES5: */
var modulo = require('modulo-11')

/* modulo.calc => 0 */
modulo.calc(nit) // Obtiene unicamente el digito de verificación 

/** modulo.format => '${nit}-0' */
modulo.format(nit) //  '000000000-0' ;

Tener en cuenta que las funciones modulo.calc() y modulo.format() adminten tanto numeros enteros como strings.

TODO

  • Crear Pruebas Unitarias.
  • Crear builds para browser.
  • Publicar en algún cdn.

Licencia

Copyright 2016 Hansel Morales

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Validación digito de verificacion de la DIAN. Calculo basado en el algoritmo de modulo 11.

Resources

License

Stars

Watchers

Forks

Packages

No packages published