advanced pdf template to show number 2 decimals on...
# ask-stanley-ai
k
advanced pdf template to show number 2 decimals only
c
AI generated answer (using internal Slack threads):
In NetSuite's Advanced PDF templates, you can format a number to show only 2 decimal places using the Freemarker built-in
string
function. Here is an example of how you can do this:
Copy code
freemarker
${record.total?string("0.00")}
In this example,
record.total
is the field you want to format. The
?string("0.00")
part is what formats the number to 2 decimal places. You can replace
record.total
with any field you want to format. For example, if you want to format the
item.quantity
field, you would do:
Copy code
freemarker
${item.quantity?string("0.00")}
For more information, you can refer to the Freemarker documentation on number formatting: https://freemarker.apache.org/docs/ref_builtins_number.html#ref_builtin_string_for_number ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84991461
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841552734
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.839233398
Please provide your feedback on this answer.