Method AbstractEinvoice():addRecipient() Professional

Adds a buyer, deliver-to or payee party (BG-7/BG-10/BG-13).

Syntax
:addRecipient( <xParty>, [<cRole>] ) --> self
Parameters
<xParty>
The party, specified either as an EinvoiceParty() object or as a DataObject with the corresponding members. Refer to the method EinvoiceParty():from() for details.
<cRole>
The role of the party. The supported values are "buyer", "shipTo" and "payee". This defaults to "buyer".
Return

This method returns self.

Description

Assigns a party which receives the invoice, the goods or the payment. The <cRole> parameter determines the role of the party.

"buyer" - Sets the buyer (BG-7). Every invoice requires exactly one buyer. A runtime error is raised if a buyer has already been set or if the country of the party is rejected by :acceptsBuyerCountry().

"shipTo" - Sets the deliver-to party (BG-13).

"payee" - Sets the payee (BG-10). A payee is only required if the party receiving the payment differs from the seller.

A runtime error is raised if any other role is specified. When the invoice is created through EinvFactory(), the buyer is assigned automatically.

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.