Error in an account in 2021



In need of some advice and/or assistance.

I have an account where the customer never contacted us until I threatened a debt collector on him regarding an outstanding invoice.  This customer never send in Remittance's when they made a payment until about 6 months ago, so payments had always been allocated to the oldest invoice.

Today the customer came back to me and told me that there was an error on the account in June 2021... (yes, 2021)... The person looking after the accounts at the time entered a payment as a "Sales Payment" instead of as a "Sales Receipt".  

Can anyone offer any advise as to how I can now sort this out please?