We usually tip 20% unless service is not what it should be, so we always just tipped the amount of the discount. Saved a lot of calculations after dinner!
Tipping should always be based on the price before any discounts or coupons that are applied. That way, the server doesn't get penalized for any coupons or promotions the restaurant may be running.