Method EinvoiceAllowanceCharge():new() Professional

Initializes a new allowance or charge object.

Syntax
:new( [<oInit>] ) --> self
Parameters
<oInit>
An optional DataObject with the initial values. This defaults to NIL, meaning an empty object is created whose values can be assigned via the setter methods.
Return

This method returns self.

Description

Initializes an allowance or charge object. If <oInit> is specified, the values are taken from its members :Amount, :Charge, :Reason, :ReasonCode, :VatCategory, :VatRate, :Percent and :BaseAmount. All members are optional. Each value is assigned via the corresponding setter method, for example :setAmount() for the member :Amount.

A missing member is treated as NIL. As a result, the amount defaults to zero and the object is treated as an allowance unless the member :Charge contains .T. (true).

If <oInit> is specified but is not an object, this method raises a runtime error.

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.