• 01-03-2014, 12:58 AM
EBITON5
Hi ,
I whoul like to change the precent from *1.17 (17%) to calc of precent like this :
3% + 5% + 5\$

For example :

The resault is 10\$ - i want to get :

10\$ +3%(0.3\$) + 0.5% (0.51\$) + 5\$ = 15.81\$

How i change this line to this calc
if(results[i].getSite()=='Xxx'&&XPrice==0)
{
XPrice =(results[i].getPrice() *1.17);
}
}

Thank you so much ! :D:
• 01-03-2014, 01:55 AM
jim829
First, check your percentages. 3% is 3/100 or .03 and 5% is 5/100 or .05. It sounds like you want 17% of 10 to be the same as some x% of 10 + y% of 10 + 5. But that makes x and y arbitrary values and they could be anything. So I am not really certain what you are asking for.

Regards,
Jim
• 01-03-2014, 02:02 AM
EBITON5
run a search and this code The result is multiplied in this case by 17% (1.17 *)

I do not want the result will be multipliedbut rather I want result has to be calculated like this:

X% + Y% + Z \$.

Is it possible? If yes how it will look in the code?

Thank you!!!
• 01-03-2014, 02:03 AM
EBITON5
Something like this ( but correct :)) :

if(results[i].getSite()=='Xxx'&&XPrice==0)
{
XPrice =(results[i].getPrice() x% + y% + 5\$ );
}
}
• 01-03-2014, 03:04 AM
jim829
`XPrice =(results[i].getPrice() x% + y% + 5\$ );`