Method EinvoiceAllowanceCharge():from() Professional
Converts a value into an allowance or charge object.
:from( <xSpec> ) --> oAllowanceCharge
An EinvoiceAllowanceCharge object.
Returns an EinvoiceAllowanceCharge() object for <xSpec>. If <xSpec> is already an EinvoiceAllowanceCharge object, it is returned unchanged. Otherwise, a new object is created via EinvoiceAllowanceCharge():new( xSpec ). This allows a DataObject with the corresponding members to be used wherever an EinvoiceAllowanceCharge object is expected.
The method is used by AbstractEinvoice:addAllowance() and AbstractEinvoice:addCharge(). Refer to the method :init() for the supported members. If <xSpec> is neither NIL nor an object, a runtime error is raised.
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.