If payment cancellations are enabled in your clinic location's settings, you do not need to create a credit note. You can simply cancel the wrong payment.
If payment cancellations are not allowed, you must create a credit note:
Create a credit note and select Credit the invoice, create new draft. Select all payments to refund and select Continue. This option credits the original invoice and creates a new invoice draft.
Add the payment to the correct invoice.
