Below is the Javascript code I am using:
$(".myCorOpt").change(function () {
var $corporateA = $("#corporateA").val();
var $corporateB = $("#corporateB").val();
var $corporateE = $("#corporateE").val();
var $corElevators = Math.ceil($corporateE * ($corporateA + + $corporateB) / 1000);
var $corColumns = Math.ceil(($corporateA + + $corporateB) / 20);
var $elevatorsPerColumnsCor = Math.ceil($corElevators / $corColumns);
var $corTotalElevators = $elevatorsPerColumnsCor * $corColumns;
})
Given that $corporateA = 89, $corporateB = 6, and $corporateE = 240. If I manually perform the calculations, I expect the following results:
Math.ceil(240(89+6)/1000) = 23
Math.ceil((89+6)/20) = 5
Math.ceil(23/5)=5
$corTotalElevators = 5*5=25
However, when I input these values into my quote form on the website, the final result shows as 225 instead of 25. Can anyone help me figure out what went wrong?