I have a form asking for miles traveled. I need what they enter to round up to the next nearest whole mile. I have called that field "mileage". I have set it to whole numbers and it rounds up nicely for display. Now I need to multiple that new rounded "mileage" number by .56 (that field is called "auto"). What I currently have in the "auto" field is: mileage*.56 Unfortunately, it still uses whatever they type in to calculate with and not the rounded up "mileage" whole number.
What script do I need on which field to make the 56 cent calculation apply to the rounded up mileage and not the entered amount which it's currently doing?
Well, I spoke too soon so I'm starting this thread again. The above script works great except it rounds everything to the next highest number. The requestor would like everything from 2.0 to 2.4 to round DOWN and everything from 2.5 (or whatever number they are entering) to round UP.
I tried changing the command in this script from "ceil" to "round" which does work just fine except now the amount for the "Payout" calculates the entire amount they typed in the mileage field. If they typed 2.4 miles, the miles round down and display as 2 but the Payout still calculates 2.4 x .56. How do I make it now use the "rounded" number to multiply by? I spent all morning trying different combinations of things hoping it was just a simple fix but nooooo. Please help!