diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index d0833229..104f66db 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -94,12 +94,12 @@ export function secondsToDuration(seconds) { return `${hours}h ${minutes}m ${_seconds}s` } -export function formatNumberIntoCurrency(value) { +export function formatNumberIntoCurrency(value, currency = 'INR') { if (value) { return value.toLocaleString('en-IN', { - maximumFractionDigits: 2, + maximumFractionDigits: 0, style: 'currency', - currency: 'INR', + currency: currency ? currency : 'INR', }) } return ''