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

Update regex for Swiss VAT numbers to match new format based on Swiss BID number #6

Closed
wants to merge 1 commit into from
Closed

Update regex for Swiss VAT numbers to match new format based on Swiss BID number #6

wants to merge 1 commit into from

Conversation

@ralphje
Copy link
Owner

ralphje commented Apr 8, 2016

I don't think the MWST/TVA/IVA is actually part of the CH VAT number. I believe it is actually part of the formatting of the number. We should remove that part in cleanup from the data, and format it accordingly for display. I think this is the best approach, as the choice for MWST, TVA or IVA actually seems te depend on the language context when it is displayed, not when it is entered.

See for instance the tables on http://www.bfs.admin.ch/bfs/portal/de/index/themen/00/05/blank/03/02.html (e.g. section Mehrwertsteuergruppe), the MWST-part is not shown in these tables. It would have it was actually part of the number itself.

On the other hand, I am still doubting whether the E-part of CHE should be part of the VAT number. It's there because Switzerland uses an alpha-3 code instead of an alpha-2.

@ralphje ralphje closed this in f70b4d2 Dec 31, 2016
@eriktelepovsky
Copy link

Hello. Please add "E" as a part of Swiss VAT number. Check this out: "CHE112355309"

https://vatapp.net/vat-number-check

@eriktelepovsky
Copy link

How to check Swiss VAT number?

Enter Swiss VAT number in the following format: CHE and number that can have 9 digits MWST/TVA/IVA. MWST/TVA/IVA part is optional. Swiss VAT number validation results are obtained in real time from UID register, The Swiss Federal Statistical Office (FSO) , Switzerland.

@ralphje
Copy link
Owner

ralphje commented May 15, 2021

I do agree that I was a bit too stringent five years ago. The intermediate solution would be to use the display class to fix this, though I agree it is probably best to store the E in the database at some point.

@eriktelepovsky
Copy link

Perfect :-) I am looking forward to accept pull request.

@eriktelepovsky
Copy link

Hello. Can you merge this PR, please?

@ralphje
Copy link
Owner

ralphje commented Nov 26, 2021

Not directly, I still do not agree that the TVA|MWST|IVA is part of the Swiss number. Furthermore, I do not think we should accept the E and keep it optional. It is either the E in there, or not. We should also adjust https://github.com/ralphje/django-internationalflavor/blob/master/internationalflavor/vat_number/validators.py#L22 to make sure that it inserts it when needed, so that this change is as transparent as possible.

Note that the display class already ensures that CHE gets printed for CH codes, so I'm not even sure that the issue is still actually there. It is just a matter of what to store in the database now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants