feat: enhance number formatting in CompareCriteria class

This commit is contained in:
Nawaz Dhandala
2025-11-13 15:10:17 +00:00
parent 7864bbb87b
commit 8a3feab3d0

View File

@@ -636,7 +636,15 @@ export default class CompareCriteria {
}
if (typeof value === Typeof.Number) {
return (value as number).toFixed(2);
const numericValue: number = value as number;
if (Number.isInteger(numericValue)) {
return numericValue.toString();
}
const roundedValue: number = Number(numericValue.toFixed(2));
return roundedValue.toString();
}
if (typeof value === Typeof.Boolean) {