Method EinvoiceParty():hasValidVatIdFor() Professional
Checks whether the VAT identification number is valid for a country.
:hasValidVatIdFor( <cCountry> ) --> lValid
.T. (true) if the VAT identification number is syntactically valid and belongs to the given country, .F. (false) otherwise.
Checks whether the VAT identification number of the party is syntactically valid and whether its prefix matches the VAT prefix of the given country. The syntax check is performed by EinvCheckVatId(). It verifies the general structure and, for a number of known countries, the national format. No checksum test and no online lookup are performed.
The expected prefix is determined via EinvVatPrefixFor(), which maps the country code "GR" to the VAT prefix "EL".
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.