When using Avalara, corrections to AR Documents including sales tax have rules. If the purpose of the Credit Memo is to cancel or modify tax, user will need to reverse the full amount of invoice. The correction document must have the same application amount when making API call to Avalara. If it doesn’t, system will return an error.
The recommended procedure is to reverse/correct invoice with sales tax, using Credit Memo with same application amount. This will ensure taxes on Credit Memo will be returned by Avalara consistent with original invoice, as meant to reverse the impact. After released/closed, user should create new invoice using accurate tax parameters.