Method EinvoiceLineItem():from() Professional

Converts a value into a line item object.

Syntax
:from( <xItem> ) --> oLine
Parameters
<xItem>
The line item, specified either as an EinvoiceLineItem object or as a DataObject with the corresponding members, or NIL. Refer to the method :init() for the supported members.
Return

An EinvoiceLineItem object.

Description

Returns an EinvoiceLineItem object for the value passed. If <xItem> is already an EinvoiceLineItem object, it is returned unchanged. Otherwise, a new line item is created with EinvoiceLineItem():new( <xItem> ). This allows a DataObject with the corresponding members to be used wherever an EinvoiceLineItem object is expected.

If <xItem> is NIL, an empty line item with default values is returned. A runtime error is raised if <xItem> is neither NIL nor an object.

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.