Class EinvoiceLineItem() Professional
An invoice line of an electronic invoice.
The EinvoiceLineItem class represents an invoice line (BG-25) as defined by the European standard EN 16931. An invoice line consists of the invoiced quantity, the unit of measure, the net price and optionally the gross price and the price base quantity. It also holds the information used to determine the VAT of the line, namely the kind of supply, the VAT category, the VAT rate and the exemption reason, as well as item identifiers such as the seller's and buyer's item identifiers and the GTIN, and an optional invoice line period.
A line item object can be created in two ways. EinvoiceLineItem():new() can be called with a DataObject which contains members with the same names as the line fields. Alternatively, an empty line item can be created with EinvoiceLineItem():new() and filled with the setter methods such as :setName(), :setQuantity() and :setPrice(). Both ways call the same setter methods, so the values are normalized identically. Character strings passed to the text setters are converted to UTF-8 according to the current SET CHARSET setting. Values of other types are stored unchanged.
The line item is added to an invoice with AbstractEinvoice():addLineItem(). If not set explicitly, the quantity defaults to 1, the unit code defaults to EINV_UNIT_ONE and the kind of supply defaults to "goods".
If the VAT category and the VAT rate are not set, the scenario classes DomesticEinvoice, IntraEuEinvoice and ExportEinvoice determine them from the kind of supply and the seller profile. For a ManualEinvoice(), the VAT category must be set explicitly on every line.
LOCAL oLine
oLine := EinvoiceLineItem():new():setName( "Widget" ):setQuantity( 2 ):setPrice( 9.50 )
oInvoice:addLineItem( oLine )
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.