Class EinvoiceAddress() Professional

Postal address of an invoice party.

Description

The EinvoiceAddress class represents a postal address as defined by the European standard EN 16931. It is used for the seller postal address (BG-5), the buyer postal address (BG-8) and the deliver-to address (BG-15). An address consists of up to three address lines, the post code, the city, the country code and an optional country subdivision.

An address object can be created in two ways. EinvoiceAddress():new() can be called with a DataObject which contains members with the same names as the address fields. Alternatively, an empty address can be created with EinvoiceAddress():new() and filled with the setter methods such as :setLine1(), :setCity() and :setCountryCode(). Both ways call the same setter methods, so the values are normalized identically. The country code is converted to upper case, and character strings are converted to UTF-8 according to the current SET CHARSET setting. Values of other types are stored unchanged.

Only the country code is required to select the tax scenario in EinvFactory():createInvoice(). The remaining fields are address content, although AbstractEinvoice:validate() reports a warning if the city or the post code of the seller or buyer address is missing.

Constructors
:new()
Initializes a new address object.
Class Methods
:from()
Converts a value into an address object.
Methods
:getCity()
Returns the city (BT-37/BT-52/BT-77).
:getCountryCode()
Returns the country code (BT-40/BT-55/BT-80).
:getLine1()
Returns the first address line (BT-35/BT-50/BT-75).
:getLine2()
Returns the second address line (BT-36/BT-51/BT-76).
:getLine3()
Returns the third address line (BT-162/BT-163/BT-165).
:getPostcode()
Returns the post code (BT-38/BT-53/BT-78).
:getSubdivision()
Returns the country subdivision (BT-39/BT-54/BT-79).
:setCity()
Sets the city (BT-37/BT-52/BT-77).
:setCountryCode()
Sets the country code (BT-40/BT-55/BT-80).
:setLine1()
Sets the first address line (BT-35/BT-50/BT-75).
:setLine2()
Sets the second address line (BT-36/BT-51/BT-76).
:setLine3()
Sets the third address line (BT-162/BT-163/BT-165).
:setPostcode()
Sets the post code (BT-38/BT-53/BT-78).
:setSubdivision()
Sets the country subdivision (BT-39/BT-54/BT-79).
Examples
Building an address with the setter methods
LOCAL oAddr 

oAddr := EinvoiceAddress():new() 
oAddr:setLine1( "Alexanderplatz 7" ) 
oAddr:setPostcode( "10178" ) 
oAddr:setCity( "Berlin" ) 
oAddr:setCountryCode( "DE" ) 

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.