Currency to 5 decimal places

Is there any way we can get the currency styling expanded to allow for up to 5 decimal places? It’s traditional in the US for par value for stock to be $0.00001, so many of our documents and clients use the value out to 5 decimal places and the local styling tab only allows for up to 4 decimal places.

Unfortunately, the maximum of 4 decimal places is deeply embedded in the software, and cannot be changed.

(By way of background: due to the way numbers are stored in ClauseBase — as in many other software packages — having more decimals would imply that you can have less high numbers. We went for a balance of going for 99.9999 billion, with 4 decimal places.)

As a workaround, you can use a custom function, as follows:

  • Store the par value for stock in a plain (non-fractional) number.
  • Create a custom function (e.g., called “dec5”) inside a concept you frequently use, and give it the following contents:

(str “$” (/ $1 100000))

This actually means: divide the parameter $1 by 100000, and print the result with a preceding dollar-sign.

  • For actually printing, invoke this special function with

@clj(#moredecimals, “dec5”, 125)

("#moredecimals" is a plain concept I invented, but you can basically store the custom function anywhere)

The result is then as follows:

image

image

image

Thanks, I will try this method.