The formatting below allows you to change the output of TemplateMoneyModel fields. You probably will not need to use these very often, as the money helper on its own will display based on the account's region.
Please note that these cannot be used with the number helper. Fields using the number helper will always display exactly what the user typed in.
| Format | Example Syntax | Example Output |
|
Default Currency format |
{{money AmountDue}} |
$100.00 |
|
Currency |
{{money AmountDue 'c'}} |
$100.00 USD |
|
Decimal places |
{{money AmountDue 'f' '0'}} {{money AmountDue 'f' '1'}} {{money AmountDue 'f' '2'}} {{money AmountDue 'f' '3'}} |
$100 $100.0 $100.00 $100.000 |
|
Currency + Decimal places |
{{money AmountDue 'cf' '3'}} |
$100.000 USD |
|
Display no currency symbol, cannot force two decimal places |
{{number AmountDue.Amount}} |
100 |
Comments
0 comments
Article is closed for comments.