Avatax doesn't like using the same invoice#. It's been awhile, but my experience has been when an invoice is re-used, it will override the existing invoice in Avatax. However, I've not had the experience of throwing an error or preventing a duplicate. Perhaps that has changed in the meantime. Consider fixing in Avatax only?