If one version of the customer doesn't have any transactional data attached, you should be able to delete that customer.
If both instances of the customer have invoices against their name you will have to transfer them all over to one customer and then delete the other one.
To do this:
- Find the version of the customer with the least amount of invoices and change it's name to have "do not use" on the end. We will delete this customer later.
- For each invoice attached to the "do not use" customer, copy the invoice, save the new version, change the customer of the invoice to the other version of the customer (the one we'll keep) and then save it again.
- For the payments, note down the details and then apply a new payment to the newly created invoice. Then go back and void the old payment attached to the "do not use" customer.
- Once the invoice and all the payments associated with it are attached to the correct customer, you can void the original one attached to the "do not use" customer.
- Once the "do not use" customer doesn't have any invoices or payments left on it, you can safely delete it.