CalcBuilder Forum

Won't calculate

User moon_453 2012-04-27 22:07:01

Ok I got the value error to go away now I need this to calculate three things commissions for years 1-3 and display like this

New Business Commissions $100
Monthly Commissions @1yr $300
Monthly Commissions @2yr ect.
Monthly Commissions @3yr ect.

I think the top is correct the way it calculates results is messed up. Heres the code

//commissions
$auto=50;
$home=160;
$lifetemp=150;
$lifeperm=450;
$Bus=375;
$Health=200;
$workcomp=130;
$spec=90;
$renew=112;

//income
$n1=$num1*$auto;
$n2=$num2*$home;
$n3=$num3*$life;
$n4=$num4*$bus;
$n5=$num5*$health;
$n6=$num6*$workcomp;
$n7=$num7*$spec;
$n8=$num2*$renew;


/*New Business Commissions*/
$sum1=$n1+$n2+$n3+$n4+$n5+$n6+$n7*.8;

/*Monthly Commissions @1yr*/
$sum2=$n1*2+$n8+$n3+$n4+$n5+$n6+$n7*.6+$sum1;


/*Monthly Commissions @2yr*/
$sum3=($n1*4)+($n8*2)+($n3*2)+($n4*2)+($n5*2)+($n6*2)+($n7*2)*.6+$sum1;

Moonsoft support 2012-04-28 10:09:33

Hello,

If you think calculations are messed up, you can add to Exit Layout intermediate values to see where could be the problem. For example, write n1=##n1## and sum1=##sum1## to see step by step the values.

Hope this helps. Regards,

...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!
...
List Manager

Build different lists for your site

Buy now!