Form not calculating correctly | WordPress.org

[ad_1]

I can’t figure out the issue as to why this form isn’t calculating the formula correctly. Someone enters the portfolio value. From there it calculates the management fee and ultimately the billed balance fee, however for amounts between 250-300 it doesn’t work. Which is odd since the field has a calculation between 250,000 and 500,000 – it seems to work over 300,000, but not below.

that part of the management fee calculation: if(fieldname5 >= 250000 && fieldname5 < 500000) return PREC(0.014*100, 2);

(Fieldname 5 being the portfolio amount)

Billed balance fee calculation:

if(fieldname4 >= 5000) return 0;
if(fieldname4 < 5000) return (5000 – fieldname4);

How could some of the amounts work, and others not in the same line?

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer