Method EinvoiceDecimal():sum() Professional
Calculates the sum of an array of values.
:sum( <aList> ) --> oSum
A new EinvoiceDecimal object with the sum of all elements, or with the value zero if <aList> is empty or not an array.
Calculates the sum of all elements of an array. Each element is converted via EinvoiceDecimal():of() and added via :add(), starting from zero. The method is used by AbstractEinvoice:toModel() to calculate the invoice totals.
If <aList> is not an array, the method returns zero. If an element cannot be converted, 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.