1
I need to get the .tofixed(2)
work with commas and not with stitch
as decimal separator.
In this case, when I calculate the final result is "501.60" and the right one would be "501.60".
document.getElementById('resultado'+tipo+'_'+index).value = (Valor1 * Valor2).toFixed(2);
Use replace after the tofixed to swap the point for the comma ex: tofixed(2). replace(".",",");
– Rafael Salomão