Method EinvoiceDecimal():toFixed() Professional

Converts the value to a string with fixed decimals.

Syntax
:toFixed( [<nDp>] ) --> cValue
Parameters
<nDp>
The number of decimal places. This defaults to 2.
Return

A string with the value formatted with <nDp> decimal places, for example "1234.50".

Description

Converts the value of the object to a character string with exactly <nDp>decimal places. The value is rounded half away from zero first. The decimal separator is always a period, and no thousands separators are inserted. For example, :toFixed( 2 ) converts the value 1234.5 to "1234.50".

This method should be used to display amounts. Converting the value with :toNumber() and Str() instead can reintroduce floating point rounding errors.

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.