Method AbstractEinvoice():new() Professional

Initializes a new invoice object.

Syntax
:new( <cNumber>, [<xIssueDate>], [<cTypeCode>], [<cCurrency>] ) --> self
Parameters
<cNumber>
The invoice number (BT-1).
<xIssueDate>
The issue date of the invoice (BT-2). The date can be specified as a date value or as a character string in the format "YYYY-MM-DD" or "YYYYMMDD". This defaults to the current date.
<cTypeCode>
The invoice type code as defined in UNTDID 1001 (BT-3). This defaults to EINV_TYPE_COMMERCIAL ("380", commercial invoice).
<cCurrency>
The invoice currency as an ISO 4217 currency code (BT-5). This defaults to "EUR".
Return

This method returns self.

Description

Initializes an empty invoice without seller, buyer or invoice lines. The type code defaults to commercial invoice and the currency defaults to "EUR".

This method must not be called on the AbstractEinvoice class itself. Doing so raises a runtime error. Instead, an invoice object must be created through one of the scenario subclasses DomesticEinvoice(), IntraEuEinvoice(), ExportEinvoice() or ManualEinvoice(). Alternatively, the methods EinvFactory():createInvoice() and EinvFactory():createManualInvoice() can be used, which select the appropriate subclass 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.