Class EinvoiceProfileRegistry() Professional
Class for looking up the country profile of a seller.
The EinvoiceProfileRegistry class maps the ISO country code of a seller to the corresponding EinvoiceCountryProfile() object. The registry is shared by the whole process. It is the extension point for the country-specific VAT rules of a seller, such as the default and known VAT rates, the legally required invoice statements and an optional national validation. Refer to the EinvoiceCountryProfile() class for details.
The registry contains built-in profiles for DE, AT and FR. The class method EinvoiceProfileRegistry():register() adds a custom profile for another country or replaces a built-in profile.
A profile never needs to be assigned to an invoice directly. The method AbstractEinvoice():getProfile() looks up the profile in the registry by the country of the seller automatically.
A seller country without a registered profile is supported as well. In this case, EinvoiceProfileRegistry():forCountry() returns a new, neutral EinvoiceCountryProfile object with the wording of the EU VAT Directive and without a default rate. Every standard-rated invoice line then requires an explicit VAT rate.
LOCAL oOptions := DataObject():new()
oOptions:DefaultRate := 21
oOptions:KnownRates := { 21, 9 }
EinvoiceProfileRegistry():register( EinvoiceCountryProfile():new( "NL", oOptions ) )
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.