Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vat number rule for es-MX #1812

Merged
merged 1 commit into from
Jan 25, 2020

Conversation

arandilopez
Copy link
Contributor

This change adds the correct way to generate Mexican vat numbers (or tax ids, aka RFC in Mexico). In Mexico there are two different type of vat numbers: For business and for individuals.

  • For business, a RFC has the format: 3 chars (including Ñ) according to business name initials, following of a date in format YYMMDD, then a unique alphanumeric key made of 3 chars.
  • For individuals, a RFC has the format: 4 chars (including Ñ) according to name initials, followed of the birth date in format YYMMDD, then a unique alphanumeric key made of 3 chars

I'm adding this change in order to improve our fixtures set at boxfactura as we depend in the correctness of a tax id.

Copy link
Member

@vbrazo vbrazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Copy link
Member

@vbrazo vbrazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vbrazo vbrazo merged commit d94e28e into faker-ruby:master Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants