Method EinvoiceProfileRegistry():forCountry() Professional

Returns the country profile for a country.

Syntax
:forCountry( <cCountry> ) --> oProfile
Parameters
<cCountry>
The ISO 3166-1 alpha-2 code of the seller country.
Return

The EinvoiceCountryProfile() object registered for the country, or a new neutral EinvoiceCountryProfile object if no profile is registered.

Description

Returns the country profile which has been registered for the country <cCountry>via EinvoiceProfileRegistry():register(). If no profile is registered for the country, a new EinvoiceCountryProfile() object with the neutral EU defaults is created via EinvoiceCountryProfile():new( cCountry, NIL ). This profile contains the wording based on Art. 226 (11) and (11a) of the EU VAT Directive and has neither a default rate nor known rates. The new profile is not added to the registry.

The method is called by AbstractEinvoice():getProfile() for the country of the seller. For this reason, an unregistered seller country does not cause a runtime error. However, since the neutral profile has no default VAT rate, every standard-rated invoice line requires an explicit VAT rate.

The function EinvProfileFor() provides the same functionality.

Feedback

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.