Thanks for joining the thread, kstrong1109.
I'm by no means an accounting professional. However, I'd like to join this discussion and share some insight that can help you get you on the right track.
Ideally, transactions that were entered in error should be deleted to avoid any discrepancies. By doing this, the payment applied to the duplicate invoice will be recognized by QuickBooks as a credit for your customer, as mentioned in the awesome answer provided by my colleague, MariaAlmaT.
However, since you mentioned these transactions were from a previous year, you may wish to seek additional guidance from an accounting professional. That said, I'd highly recommend we ask for @qbteachmt's opinion on this matter.
Don't hesitate to reach out to me here in the Community with any additional questions or concerns you may have. Thanks for dropping in, wishing you and your business only the best.