How to apply payment to correct invoice

I created 2 invoices a year apart. I received 2 payments a year apart. Somehow the payments got applied to the wrong invoice. Don't know how it happened, since they were a year apart. The amounts are the same so I show
a zero balance, however I want to correct the payment to the correct payment. i.e. Invoice 1 should have been paid by payment 1, Invoice 2 should have been paid by payment 2. 1 was paid by 2 and 2 was paid by 1. Any clue how I can straighten this out. Tx
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a site by and for consumers of financial services and advice. We are not affiliated with any of the banks, financial services or software manufacturers discussed here. All logos and trade names are the property of their respective owners.

Tax and financial advice you come across on this site is freely given by your peers and professionals on their own time and out of the kindness of their hearts. We can guarantee neither accuracy of such advice nor its applicability for your situation. Simply put, you are fully responsible for the results of using information from this site in real life situations.