If I understand correctly, it seems like you are manually calculating the tax and entering it to the invoice amount. If you configure your taxes in Oracle, and then enter the invoice for the actual amount, then Oracle will know the true invoice amount which is the discount basis and create the tax line according to the configurations (the way you want it). What you are doing now is adding the tax outside Apps configuration and then expecting Apps to calculate the appropriate discount. If you want to use the standard functionality, you need to set up all dependent parts of that functionality. If tax calculation is a dependency of the discount basis, which is certainly a dependency of discount coupons payment terms, then you need to set it up properly.