mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +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:
@ -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