Method EinvoiceCountryProfile():new() Professional

Initializes a new country profile.

Syntax
:new( <cCountry>, [<oOptions>] ) --> self
Parameters
<cCountry>
The ISO 3166-1 alpha-2 code of the seller country to which the profile applies.
<oOptions>
A DataObject with the settings of the profile. This defaults to NIL, meaning that the neutral EU defaults are used.
Return

This method returns self.

Description

Initializes a country profile for the country <cCountry>. The settings of the profile are taken from the DataObject <oOptions>. Every member of this DataObject is optional. The following members are supported:

:DefaultRate - The VAT rate in percent which is used for a standard-rated invoice line without an explicit VAT rate. The rate can be specified as a numeric value, a character string or an EinvoiceDecimal() object. If this member is not set, the profile has no default rate.

:KnownRates - An array of VAT rates which are considered normal for the country. These rates are only used to report a warning for an unusual VAT rate. Every other rate is still accepted.

:TaxNumberSuffices - Set to .T. (true) if the national tax number of the seller can be used instead of a VAT identifier. Any other value is treated as .F. (false).

:Texts - A DataObject which overrides the statements for one or more of the members :ReverseChargeEu, :ReverseChargeDomestic, :IntraCommunity, :Export, :NotSubject and :SmallBusiness. A member which is not set keeps the neutral wording based on the EU VAT Directive.

:Hints - A DataObject which overrides the warning hints for the members :IntraCommunity and :ReverseChargeEu. Each member contains an array of hint texts. A member which is not set keeps the neutral hints.

:Validate - A code block {|oCtx| ... } which is evaluated at the end of AbstractEinvoice():validate() for country-specific checks. The code block receives the validation context, a DataObject with the members :Model, :Error and :Warn.

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.