To ensure a discount is applied only to a bill's subtotal, and not on taxes, uncheck the "Discount on Total Amount?" checkbox when creating a new order discount or editing an existing one.