2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

Improve documentation on currency rendering

This commit is contained in:
Oliver Walters
2023-05-05 22:54:41 +10:00
parent 9920c3fd9c
commit 76848dcc90
2 changed files with 17 additions and 1 deletions

View File

@ -34,6 +34,16 @@ Total Price: {% render_currency order.total_price currency='NZD' decimal_places=
{% endraw %}
```
The following keyword arguments are available to the `render_currency` function:
| Argument | Description |
| --- | --- |
| currency | Specify the currency code to render in (will attempt conversion if different to provided currency) |
| decimal_places | Specify the number of decimal places to render |
| min_decimal_places | Specify the minimum number of decimal places to render (ignored if *decimal_places* is specified) |
| max_decimal_places | Specify the maximum number of decimal places to render (ignored if *decimal_places* is specified) |
| include_symbol | Include currency symbol in rendered value (default = True) |
## Maths Operations
Simple mathematical operators are available, as demonstrated in the example template below: