Method EinvoiceParty():new() Professional

Initializes a new party object.

Syntax
:new( [<oInit>] ) --> self
Parameters
<oInit>
An optional DataObject with the party data. This defaults to NIL, meaning an empty party is created.
Return

This method returns self.

Description

Initializes a party object, optionally from a DataObject whose members have the same names as the party fields. Each member found in <oInit> is passed to the corresponding builder method. Members which are not present are treated as NIL.

The following members are supported:

:Name, :TradingName, :Id, :LegalId, :VatId and :TaxNumber - The values are passed to :setName(), :setTradingName(), :setId(), :setLegalId(), :setVatId() and :setTaxNumber().

GlobalId - A DataObject with the members :Scheme and :Value, which are passed to :setGlobalId().

Address - An EinvoiceAddress() object or a DataObject, which is passed to :setAddress(). If the member is missing, the party receives an empty address.

Contact - A DataObject with the members :Name, :Phone and :Email, which are passed to :setContact().

ElectronicAddress - Either a character string with the address value or a DataObject with the members :Value and :Scheme, which are passed to :setElectronicAddress().

SmallBusiness - A logical value which is passed to :setSmallBusiness(). Only the value .T. (true) marks the party as a small enterprise.

If <oInit> is NIL, an empty party is created which can be filled via the builder methods. If <oInit> is neither NIL nor an object, a runtime error is raised.

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.