That's certainly possible, but you'll need to use a custom JavaScript somewhere. I'd suggest setting up a field to calculate the discount amount, which would look at the amounts of those four items and calculate the discount amount that then is applied to the total.
↧