Form adding 1 to calculated field
Hi,
I have a purchase order form which includes a quantity field (QtyRow1), a Unit Price field (Unit PriceRow1) and an extended total field (Extended AmountRow1). I have added script that I found in the forum to the custom calculation field to return a blank if zero . However, although I get a blank correctly when it's zero, it adds one to the total when there's a calculation, and I can't see where the script is telling it to do that.
This is the script that I have:
//Custom Calculate script
(function (){
//Get field values as numbers and calculate sum
var v1=+getField("QtyRow1").value;
var v2=+getField("Unit PriceRow1").value;
var sum=v1+v2;
//Set this Field's value
if (getField("Unit PriceRow1").valueAsString===""){
event.value="";
}else{
event.value=sum;
}
})();
I am using Acrobat Pro DC. Thanks in advance for any help that you can provide.
