Wrongly posted invoice for FY 2024

One of our customer created an invoice with the incorrect financial year, 2024, whereas the invoice was supposed to be created in the financial year 2025.

Now customer is ready to create the credit note for this invoice with original invoice number MS-00001. But they already have invoice with number MS-00001 in 2025 financial year.
If we create credit note now, it will create against 2025 invoice. Please check and let us know how to proceed with this.