Corrected the payment

How to correct the payment that had been posted ( and applied to the certain invoice of the Customer / Vendor balance ) to the GL and the Customer / Vendor Card ? Thanks for the help Best Regards, Agatha