Result of SUM
Hello
I trying to get the sum of the following code in Startup Script in Add.
Betraege = 90
Leistungen: 87
The results is deliverd for "Vortrag == 0" 9087 and not 177. Where should I check it?
thanks.
mpol_ch
$("#x_Vortrag").change(function() {
if (this.value == "0") {
var val1 = $("#x_Betraege").val();
var val2 = $("#x_Leistungen").val();
var sum = val1 + val2;
$("#x_Endbestand").val(sum) ;
// Set value to field #2
} else {
$("#x_Endbestand").val("800"); // Set value to field #2
}
});