Help with tiered fees formula
-
Hi,
I’m trying to put together a tiered fee calculator, and I’m struggling!
I have no knowledge of javascript, and have tried the following:
(function(){
if (fieldname2<=20833) return 625;
if (20833<fieldname2<=50000) return fieldname2*0.03;
if (50000<fieldname2<=100000) return (fieldname2-50000)*.03+1500;
if (100000<fieldname2<=500000) return (fieldname2-100000)*0.0075+2000;
if (fieldname2>500000) return (fieldname2-500000)*0.005+5000;
})();Where fieldname2 is the input amount. Unfortunately, this just displays 625 if the input is 0, and multiplies any other number by 3%
Any ideas?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Help with tiered fees formula’ is closed to new replies.