A sales total is passed to another CFM page via FORM.TOTALSALES.
On that page are six unchanging numbers, 9,18,35,50,75,100. I need know which of these six numbers is closest to FORM.TOTALSALES without exceeding FORM.TOTALSALES. The sales number from the customer can be anywhere between $0.01 (one cent) and $100.00. I cannot ignore the cents so rounding off the sales figure wouldn't be as acceptable. I will want to display the closest TOTALSALES number.
I could use a redundant combination of CFIF and CFELSEIF, etc, but I thought there may be a more elegant way one of you expert master types can point out using coldfusion. There are no database records to query so what's the best way to do this strictly with coldfusion?
Start Free Trial