You are right. There are number of tables containing vendor data. It is not recommended to change vendor ID directly in tables.
There is 3rd party tool CRF Changer which can help you making this change.
Since, there is just one vendor with couple of transactions you want to clear. Steps you can use to change vendor are :
1. Void the invoice and check
2. Use the Remove Payables Transaction History window (Microsoft Dynamics GP menu >> Tools >> Utilities >> Purchasing >> Remove Transaction History) to clear the transactions for the vendor.
3. Similarly, remove the Distribution, period and posting journal history using other remove windows under menu option Microsoft Dynamics GP menu >> Tools >> Utilities >> Purchasing >>
4. After clearing the vendor history, you will be allowed to delete the vendor.
5. Add the vendor with correct ID
6. Re-enter the invoice and check
Make sure you have database backup before making these changes. If possible, the practice the steps in test company before making changes. You can print report before removing data to make sure you do not accidently remove data for other vendors.
These steps are not recommended for the vendor with more than couple transactions.