In the Advanced PDF code, how do I override the de...
# ask-stanley-ai
r
In the Advanced PDF code, how do I override the default currency symbol and substitute an alternate one?
c
AI generated answer (using internal Slack threads):
In Advanced PDF, you can override the default currency symbol and substitute an alternate one by creating a non-stored custom field and setting it to source the value from the currency symbol. Then, use this field in your PDF template. Here is an example of how you can manipulate the currency symbol in your Advanced PDF:
Copy code
xml
<#if record.currency == "USD">
    ${record.amount?string.currency} 
<#elseif record.currency == "EUR">
    €${record.amount}
</#if>
In this example, if the currency of the record is USD, it will display the amount with the dollar symbol. If the currency is EUR, it will display the amount with the euro symbol. Also, if you are trying to change the sign of an item amount and display it as a currency, you can use the following code:
Copy code
xml
${(item.rate * -1)?string.currency}
This will multiply the item rate by -1 to flip the sign and then display it as a currency. ****** 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.848754942
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838989139
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.837646544
Please provide your feedback on this answer.