Thanks for the example, I think it illustrates perfectly what I'm getting at here. In the charge rule that is applying the tax how does it know the total to apply tax to? In your example you would want to apply the tax to the discounted amount of the cd's. How does the cart calculate the discounted price of the cd's?

In this specific example you would want to take the price of the cd's minus the discount that is specific to them, then tax that amount. The problem is that this is not how discounts are organized in the cart. You are not actually changing the price of the cd's but you are applying a discount to the subtotal of the cart. To figure out the price that is charged for the cds you would need to take a total of the total price for that item, minus the specific discount. You would need to be able to do this for each item in the cart, essentially calculating the new item price to charge tax on the fly.

This would get very complex depending on the item and discount combinations that you would need to take account for. If you could store the discount price for the items it would be much easier to find the taxable total. Also, if discounts were only given to taxable items you could rely on that to make it easier to write this tax rule.

So in a nutshell the problem is determining the discounted price for the items, applying the tax amount would be very simple if you could determine the proper total first.