Use setting in reports

This commit is contained in:
Oliver Walters 2026-06-19 07:06:48 +00:00
parent 0b4144a620
commit f2378c8402
1 changed files with 3 additions and 0 deletions

View File

@ -774,6 +774,9 @@ def modulo(x: Any, y: Any, cast: Optional[type] = None) -> Any:
@register.simple_tag
def render_currency(money, **kwargs):
"""Render a currency / Money object."""
if 'locale' not in kwargs:
if locale := get_global_setting('REPORT_CURRENCY_LOCALE', cache=True):
kwargs['locale'] = locale
return InvenTree.helpers_model.render_currency(money, **kwargs)