Problem
You have refunded a payment and then collected it again, causing an error in the payment records.
Solution
To correct this issue, follow these steps:
Add an adjustment invoice and refund the payment on the invoice.
Add a task to the invoice for the same amount.
Go to the customer profile and click Payments.
Apply the collected payment from the credits to the invoice.
Delete the task you created in step 3.