refactor(utils): always append currency .00
This commit is contained in:
parent
65bb13837e
commit
3b3979e403
1 changed files with 1 additions and 1 deletions
|
|
@ -440,7 +440,7 @@ export function commaInput(text: string): string {
|
|||
|
||||
const parts = num.toString().split('.');
|
||||
const integerPart = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
const decimalPart = parts[1]?.slice(0, 2) || '';
|
||||
const decimalPart = parts[1]?.slice(0, 2) || '00';
|
||||
|
||||
return integerPart + (decimalPart ? `.${decimalPart}` : '');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue