Git Product home page Git Product logo

rfc-facil's Introduction

app-doctor

Libreria para calcular el Registro Federal de Contribuyentes en México (RFC) en Java.

Build Status

Uso

Calcular el rfc de una persona física:

// Josué Zarzosa de la Torre nacido el 5 de Agosto de 1987
Rfc rfc = new Rfc.Builder()
            .name("Josué")
            .firstLastName("Zarzosa")
            .secondLastName("de la Torre")
            .birthday(5, 8, 1987)
            .build(); 

// se puede obtener el rfc completo
print(rfc.toString());        // ZATJ870805CK6

// se pueden obtener partes del rfc
print(rfc.tenDigitsCode);     // ZATJ870805
print(rfc.homoclave);         // CK
print(rfc.verificationDigit); // 6

Calcular el rfc de una persona moral:

Rfc rfc = new Rfc.Builder()
        .legalName("Sonora Industrial Azucarera, S. de R. L.")
        .creationDate(29, 11, 1982)
        .build();
        
// se puede obtener el rfc completo
print(rfc.toString());        // SIA-821129LS8

// se pueden obtener partes del rfc
print(rfc.tenDigitsCode);     // SIA-821129
print(rfc.homoclave);         // LS
print(rfc.verificationDigit); // 8

Download

Baja directamente el JAR de la versión más actual o declara la dependencia vía Maven:

<dependency>
  <groupId>com.josketres</groupId>
  <artifactId>rfcfacil</artifactId>
  <version>2.0.2</version>
</dependency>

o con Gradle:

compile 'com.josketres:rfcfacil:2.0.2'

Fuentes

Esta librería se basa en documentación oficial obtenida por medio del IFAI (Instituto Federal de Acceso a la Información). El documento puede ser consultado en el sitio de INFOMEX con el folio 0610100135506.

Cabe advertir que sólo la Secretaría de Hacienda y Crédito Público, a través del Servicio de Administración Tributaria, es la única instancia que oficialmente asigna las claves de RFC a los contribuyentes que así lo soliciten, a partir de la aplicación de este procedimiento a la base de datos del Padrón de Contribuyentes, con la finalidad de identificar homonimias y evitar la duplicidad de registros.

En otros Lenguajes

License

Copyright 2014 Josué Zarzosa de la Torre

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.

rfc-facil's People

Contributors

josketres avatar isccarrasco avatar yukatan avatar mon-gmx avatar acrogenesis avatar migsalazar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.