Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

Rounding Up

$
0
0

I have a script that I am working in and need a little help getting the answer to round up to the next $0.10. I am not sure if I can do this action in the script I currently have or if I need to make a new one. If so can I call two functions in the Calculations tab?

 

Here is the script I currently have. Everything in this script is currently working the way I want it to, just the last line is my attempt to get it to round - which is not working. Thanks in advance!

 

function getLEDLighting() {
var kwh = this.getField("LED kWh SavingsRow01").value;
var projCost = this.getField("LED Measure CostRow01").value;
var opHours = this.getField("LED Annual Operating HoursRow01").value;

if (kwh == "" || opHours == "" ||  projCost == "") {
  event.value = "";
}
else if (projCost/2 < kwh * .10)
{
  event.value = projCost/2;
     }
else {
          event.value = kwh * .10;
          event.value = Roundup(this.getField("LED SubtotalRow01")).value;

}
}


Viewing all articles
Browse latest Browse all 73766

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>