Code: Select all
$costperitem = round((1+(strlen($name+$desc)+($hpdefend*$hpdamage))/1+($hpdamage+$hpdefend+($hpdamage+$hpdefend-($hpdamage+$hpdefend/2))))/10000,3);
$totalcost=round($costperitem*($quantity),3);
if($quantity>50000)$totalcost=$totalcost*0.9;
if($quantity>100000)$totalcost=$totalcost*0.8;
if($quantity>1000000)$totalcost=$totalcost*0.7;
if($quantity>10000000)$totalcost=$totalcost*0.6;
echo("Cost per item: ".$costperitem." ICs
");
echo("Total Cost: ".$totalcost." ICs
");
echo("Discount savings: ".($costperitem-($totalcost/$quantity))." ICs per item
");
echo("Actual cost per item: ".($totalcost/$quantity)." ICs per item
");
[code]
;)
[color=#888888][size=85]Archived topic from Iceteks, old topic ID:2944, old post ID:24011[/size][/color]