-1
I’m using the following code:
<script>
    function calcValor() {
        //Zera o campo total
        document.getElementById("CAMPO_78").value;
        //Declarando a variavel
        let preco, porcentagem, desconto, novopreco;
        //Obtendo dados atraves do prompt
        preco = parseFloat(document.getElementById("CAMPO_75").value);
        porcentagem = parseFloat(document.getElementById("CAMPO_85").value);
        if (isNaN(preco));
        //Realizando os calculos
        desconto = preco * porcentagem / 100;
        novopreco = preco - desconto;
        if (isNaN(novopreco));
        //O .toFixed(2) faz com que o valor seja corrijdo para duas casas decimais
        //document.write("O preço com desconto é R$ " + novopreco.toFixed(2) + "!!!");
        document.getElementById("CAMPO_78").value = 'R$ ' + novopreco;
    } 
</script>
<div class="row">
    <div class="col-md-2">
        <label class="a3label control-label" for="CAMPO_75">Valor da Mensalidade</label> 
        <input class="a3formcontrol form-control money" data-campo-id="@@75@@" data-nome="75 - Mensalidade" data-tipo-documental-id="3" id="CAMPO_75" onfocus="calcValor()" type="text" />
    </div>
    <div class="col-md-2">
        <label class="a3label control-label" for="CAMPO_76">Bolsa (%)</label> 
        <input class="a3formcontrol form-control" data-campo-id="@@85@@" data-nome="85 - Bolsa (%)" data-tipo-documental-id="3" id="CAMPO_85" type="text" onfocus="calcValor()"/>
    </div>
</div>
The calculation is done in the correct way, but in certain situations, as this below:
It ends up rounding to an integer value. And when I put one to change the number of the variable percentage, it does not change, but when I replace the . for , with the result. 
Someone’s been there and can help me ?
