I guess “toFixed” thinks the input is a string. This works:
parseInt (${saleprice}).toFixed(2);
But of course, just parseInt will be enough for removing the decimals:
parseInt (${saleprice});
{
"CreationDate": "2018-11-4",
"Commands": [
{
"Command": "store",
"Target": "2650.123",
"Value": "s1"
},
{
"Command": "storeEval",
"Target": "parseInt (${s1}).toFixed(2);",
"Value": "s2"
},
{
"Command": "echo",
"Target": "before=${s1}, after=${s2}, ",
"Value": ""
}
]
}