$cost = $quantity * $rate; $index *= 100