2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-10-30 04:35:42 +00:00

Report tag fixes (#10668)

* remove duplicate template tag

* Add "multiplier" argument to render_currency

* Improve render_currency

- Enable conversion of non-money values to a Money instance

* Improve maths tags

- Convert values to Decimal
- Ability to cast result to different type

* Updated docs

* Improved feedback from maths tags

* Updated unit testing

* Improved rendering of printing errors

* Add extra test for render_currency tag

* Enfoce multiplier type

* Fix docstrings

* Improved error handling

* Remove defunct unit test

* Fix unit tests
This commit is contained in:
Oliver
2025-10-25 13:17:10 +11:00
committed by GitHub
parent a2682a75e9
commit 8e1d621db9
8 changed files with 201 additions and 54 deletions

View File

@@ -267,7 +267,7 @@ Simple mathematical operators are available, as demonstrated in the example temp
### 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 will be converted to floating point numbers 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