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

CIF generator #2518

Open
randreu28 opened this issue Oct 31, 2023 · 6 comments
Open

CIF generator #2518

randreu28 opened this issue Oct 31, 2023 · 6 comments
Labels
c: feature Request for new feature has workaround Workaround provided or linked m: company Something is referring to the company module p: 1-normal Nothing urgent s: waiting for user interest Waiting for more users interested in this feature
Milestone

Comments

@randreu28
Copy link

Clear and concise description of the problem

I need a CIF generator. CIF is the tax identification code for businesses in spain. Similar to the LEI identifier, but particulary for spanish businesses only.

Suggested solution

Create a method similar to this:

const cif = faker.company.cif();
console.log(cif); //F19262039

Some real examples of CIF validators: https://www.generador-de-dni.com/generador-de-dni

Alternative

No response

Additional context

No response

@randreu28 randreu28 added c: feature Request for new feature s: pending triage Pending Triage s: waiting for user interest Waiting for more users interested in this feature labels Oct 31, 2023
@github-actions
Copy link

Thank you for your feature proposal.

We marked it as "waiting for user interest" for now to gather some feedback from our community:

  • If you would like to see this feature be implemented, please react to the description with an up-vote (:+1:).
  • If you have a suggestion or want to point out some special cases that need to be considered, please leave a comment, so we are aware about them.

We would also like to hear about other community members' use cases for the feature to give us a better understanding of their potential implicit or explicit requirements.

We will start the implementation based on:

  • the number of votes (:+1:) and comments
  • the relevance for the ecosystem
  • availability of alternatives and workarounds
  • and the complexity of the requested feature

We do this because:

  • There are plenty of languages/countries out there and we would like to ensure that every method can cover all or almost all of them.
  • Every feature we add to faker has "costs" associated to it:
    • initial costs: design, implementation, reviews, documentation
    • running costs: awareness of the feature itself, more complex module structure, increased bundle size, more work during refactors

View more issues which are waiting for user interest

@matthewmayer
Copy link
Contributor

This could potentially be localizable for example have

faker.company.number()

And then for the es locale it gives a CIF, for the en_GB locale it gives a UK Company number etc.

@xDivisionByZerox
Copy link
Member

[...] Similar to the LEI identifier, but particulary for spanish businesses only. [...]

We support over 60 locales. Please tell me how other locales would use this. What is the expected behavior, for example, for fakerEN.company.cif()? en is our default locale. So it must not error on functions with an "not applicable" error.

@matthewmayer
Copy link
Contributor

A generic en locale could probably return a DUNS number. That's fairly standard internationally.

@matthewmayer
Copy link
Contributor

Ah there's actually an open issue for DUNS number also #1202

@matthewmayer
Copy link
Contributor

Something like faker.helpers.fromRegExp("[ABCDEFGHJNPQRSUVW][0-9]{7}[0-9A-J]") should work as a workaround for making CIF numbers in the meantime.

@ST-DDT ST-DDT added has workaround Workaround provided or linked p: 1-normal Nothing urgent m: company Something is referring to the company module and removed s: pending triage Pending Triage labels Oct 31, 2023
@ST-DDT ST-DDT added this to the vFuture milestone Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature has workaround Workaround provided or linked m: company Something is referring to the company module p: 1-normal Nothing urgent s: waiting for user interest Waiting for more users interested in this feature
Projects
None yet
Development

No branches or pull requests

4 participants