A discount is a discount right? The original price and original tax won't change, whenever you apply a discount on the whole order. Instead, you subtract something from the total amount. That is the easiest approach.
So there are two forms of discounts. A discount that you apply at the whole order, so $40 off of the total amount or 20% off of the total amount.
The second form of discount is based on a discount per item. This way you don't have to apply it at the end anymore. In that case, you do change the original price and tax since it only applies to that specific item.
It sounds to me that you have the first form where you subtract $40 of the total amount. So keep it as simple as possible here, by just discounting it from the total price ;)
If you do want to update the tax values as well, you indeed have to calculate everything per item which is way more complicated and also you get rounding issues with 2 numbers behind the comma.