How do I apply or calculate tax before a discount in the point-of-sale (POS)?