Basically, when applying a coupon, the tax is calculated based on the initial amount, not the discounted amount, which is wrong. Also, when entering the coup…