0
In a solar calculator, everything works, except the final value that returns Nan. Where is my error?
function calcular(valorInformado) {
ResultPotencia = parseFloat(valorInformado * 8.28 / 1000).toFixed(2);
ResultModulos = parseInt(ResultPotencia * 8.28 / 1000);
ResultArea = parseFloat(ResultModulos * 2);
Result1 = parseFloat(11 * ResultPotencia * 0.85 * 1000).toFixed(3);
Result2 = parseFloat(11 * ResultPotencia * 1.10 * 1000).toFixed(3);
var elemResult = document.getElementById("resultadopotencia");
elemResult.innerText = " " + ResultPotencia + " KWp" ;
var elemResult = document.getElementById("resultadomodulos");
elemResult.innerText = " " + parseInt(ResultPotencia * 1000 / 265) + " Módulos";
var elemResult = document.getElementById("resultadometros");
elemResult.innerText = " " + (ResultPotencia * 1000 / 265 * 2).toFixed(1) + " M²";
var elemResult = document.getElementById("valorsistema");
elemResult.innerText = " " + (ResultIntermediario * ResultPotencia * 0.85 * 1000).toFixed(2).formatMoney();
var elemResult = document.getElementById("valorsistema2");
elemResult.innerText = " " + (ResultIntermediario * ResultPotencia * 1.10 * 1000).toFixed(2).formatMoney();
}
ResultIntermediario = function() {
var ResultIntermediario = this;
if(ResultPotencia <= 3)
ResultIntermediario = 11;
if(ResultPotencia >= 3)
ResultIntermediario = 9;
}