If your organisation has access to the Corrections tool then you may be able to change the customer code in the Transaction Enquiry screen - although there are some restrictions on this eg the period must be open. Please ensure the transaction is fully unallocated before changing it to avoid issues with the aged reports.
If not then it will be a matter of posting a reversal to allocate against the incorrect one, and then reposting as desired.
