Duplicates in party identifier types

The identifier type de_vat is a duplicate to the type eu_vat. As both represent the same identifier i think that de_vat should be removed from the list of identifier types because only the eu_vat type can be validated by VIES and it is not clear for the user which of these two types should be used.

I think that there may be some more duplicates. Did anybody stumble over this issue for any other country?

Indeed I think it will be better to find a way to make them compatible.
For example, we could automatically fill the European or country code when one is encoded. Or have a method that returns the European version from any country VAT identifier (and so the VIES check will use it).

If we go this way we should extend the functionality of VIES check to check all country VAT identifiers that can be converted to an EU VAT ID, right?

Yes.

Another point that makes important to keep national identifier is that now we know some country can leave the EU and so their eu_vat is no more valid :roll_eyes:?

1 Like

But as currently all users may have entered the VAT ID with the type eu_vat because VIES only checks IDs of this type they may need to change the type of all ids to the corresponding national one.

That’s why I think that the best would be to create automatically each type (and have a migration for current installation). This way removing a country will be about deleting the EU identifier only.

Then the invoice should use the correct tax identifier depending on the party. For example:

  • If the customer is a national party, we shoud use the national identifier.
  • If the customer is an european party, we should use the european identifier.

I guess it will be better to always use the EU format. This will mean that the national identifier will need to provide a EU formatted version.

This is not that easy as in germany for example the national identifier is not a subset of the european identifier but a completely different identifier and the companies are allowed to use the european identifier prefered over the national one :yum:

Then why we need to have all of the identifiers? Just to create the EU format?

In Spain the EU version is exactly the same but prefixed with ‘ES’. IIRC this is the case of several other countries to.

Then in germany you will only use the european identifier if available and use the national one when unique. Does it make sense?

Because we may need them.

We do not know which input the system will receive.