I know how important it is to have the option to credit your customers for future purchases. This is a great alternative to giving a refund, and QuickBooks Online makes the process simple. I'd be happy to explain how to create a credit memo, and what the limitations are.
When a credit memo is added to an invoice, the amount will be taken off the total before taxes. At this time, the option to apply the credit to the after-tax amount isn't available. I know this may be important for your business, so I'd recommend submitting your feedback about this to our product engineers for review. You can do so by clicking the Gear icon > Feedback.