mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-20 06:57:57 +00:00
Currency format fix (#7398)
* Fix for currency rendering - Handle case where max digits less than min digits * Add validators for settings
This commit is contained in:
1 parent
0cb762d6b2
commit
a5fa5f8ac3
3 files changed
+61
-18
No files matched your search
@@ -77,8 +77,8 @@ export function formatCurrency(
|
||||
let formatter = new Intl.NumberFormat(locale, {
|
||||
style: 'currency',
|
||||
currency: currency,
|
||||
maximumFractionDigits: maxDigits,
|
||||
minimumFractionDigits: minDigits
|
||||
maximumFractionDigits: Math.max(minDigits, maxDigits),
|
||||
minimumFractionDigits: Math.min(minDigits, maxDigits)
|
||||
});
|
||||
|
||||
return formatter.format(value);
|
||||
|
||||
Reference in new issue
Block a user