2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-11-09 01:25:41 +00:00
* Fix heading in helpers.md

* Helper func docs
This commit is contained in:
Oliver
2025-11-02 15:30:21 +11:00
committed by GitHub
parent 551da5a51f
commit 46615e447b

View File

@@ -273,7 +273,7 @@ To convert a currency value from one currency to another, use the `convert_curre
!!! info "Data Types" !!! info "Data Types"
The `money` parameter must be `Money` class instance. If not, an error will be raised. The `money` parameter must be `Money` class instance. If not, an error will be raised.
#### create_currency ### create_currency
Create a `currency` instance using the `create_currency` helper function. This returns a `Money` class instance based on the provided amount and currency type. Create a `currency` instance using the `create_currency` helper function. This returns a `Money` class instance based on the provided amount and currency type.
@@ -286,12 +286,13 @@ Create a `currency` instance using the `create_currency` helper function. This r
Simple mathematical operators are available, as demonstrated in the example template below. These operators can be used to perform basic arithmetic operations within the report template. Simple mathematical operators are available, as demonstrated in the example template below. These operators can be used to perform basic arithmetic operations within the report template.
### Input Types !!! info "Input Types"
These mathematical functions accept inputs of various input types, and attempt to perform the operation accordingly. Note that any inputs which are provided as strings or numbers will be converted to `Decimal` class types before the operation is performed.
These mathematical functions accept inputs of various input types, and attempt to perform the operation accordingly. Note that any inputs which are provided as strings or numbers will be converted to `Decimal` class types before the operation is performed.
### add ### add
Add two numbers together using the `add` helper function:
::: report.templatetags.report.add ::: report.templatetags.report.add
options: options:
show_docstring_description: false show_docstring_description: false
@@ -299,6 +300,8 @@ These mathematical functions accept inputs of various input types, and attempt t
### subtract ### subtract
Subtract one number from another using the `subtract` helper function:
::: report.templatetags.report.subtract ::: report.templatetags.report.subtract
options: options:
show_docstring_description: false show_docstring_description: false
@@ -306,6 +309,8 @@ These mathematical functions accept inputs of various input types, and attempt t
### multiply ### multiply
Multiply two numbers together using the `multiply` helper function:
::: report.templatetags.report.multiply ::: report.templatetags.report.multiply
options: options:
show_docstring_description: false show_docstring_description: false
@@ -313,6 +318,8 @@ These mathematical functions accept inputs of various input types, and attempt t
### divide ### divide
Divide one number by another using the `divide` helper function:
::: report.templatetags.report.divide ::: report.templatetags.report.divide
options: options:
show_docstring_description: false show_docstring_description: false
@@ -320,6 +327,8 @@ These mathematical functions accept inputs of various input types, and attempt t
### modulo ### modulo
Perform a modulo operation using the `modulo` helper function:
::: report.templatetags.report.modulo ::: report.templatetags.report.modulo
options: options:
show_docstring_description: false show_docstring_description: false