2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-10-30 12:45: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

@@ -587,9 +587,11 @@ export function ApiForm({
<Alert radius='sm' color='red' title={t`Form Error`}>
{nonFieldErrors.length > 0 ? (
<Stack gap='xs'>
{nonFieldErrors.map((message) => (
<Text key={message}>{message}</Text>
))}
{nonFieldErrors
.filter((message) => !!message && message !== 'None')
.map((message) => (
<Text key={message}>{message}</Text>
))}
</Stack>
) : (
<Text>{t`Errors exist for one or more form fields`}</Text>