In this case, you need to create a credit memo (using the incorrect vendor record) to offset the amount of the original invoice. You should then apply the credit memo to the incorrect invoice to close them both out. Once the incorrect vendors account has been corrected, you may re-enter the original invoice using the correct vendor record. (Please see the section on AP Credit Memo Application for more information about applying an AP credit memo).
More: