Method EinvoiceLineItem():new() Professional
Initializes a new line item object.
:new( [<oInit>] ) --> self
This method returns self.
Initializes a line item object, optionally from a DataObject. The DataObject can contain the members :Id, :Name, :Description, :Quantity, :UnitCode, :Price, :GrossPrice, :BaseQuantity, :VatRate, :Kind, :VatCategory, :ExemptionReason, :ExemptionReasonCode, :SellerItemId, :BuyerItemId, :Gtin, :Note, :OrderLineRef and :Period. All members are optional. Each value is passed to the corresponding setter method, so it is normalized and checked in the same way as a value assigned via :setName(), :setQuantity() and the other setter methods. The member :Period must be a DataObject with the members :Start and :End, which are passed to :setPeriod().
If <oInit> is NIL or a member is missing, the defaults of the setter methods apply. The quantity is 1, the unit code is EINV_UNIT_ONE, the net price is zero and the kind of supply is "goods".
A runtime error is raised if <oInit> is neither NIL nor an object. A runtime error is also raised if a member contains a value which is rejected by the corresponding setter method, for example an invalid :Kind or an invalid date in :Period.
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.