Tip: Convert a string to a decimal

var textValue = "46,5";
var decimalValue = parseFloat(textValue.replace(',', '.'));

Use to convert the value of an index to decimal:

var htAmount = parseFloat(getTextFromIndexInfo(getFirstIndexFromID(pParameters, "ID_INDEX")).replace(',', '.'));