Have the program calculate Sales Tax on the discounted total the customer pays or the original invoice total prior to any payments.