Invoice hung up between PO and AP due to wrong invoice # being used and the month has been closed

Our clerk entered the wrong invoice number in Purchasing when receipting the invoice. He posted invoices to AP, and that is when he realized he used the wrong invoice number. Instead of deleting the invoice in AP, unposting it in PO, and rerecieving it with the correct invoice number, he just changed the invoice number in AP. The month got closed shortly after and he failed to notify us when he would get the error from posting invoices from PO to AP : "Invoice XXXXX was not sent sucessfully: GL period closed." I am nervous to try to unpost the invoice via PO and then delete it as it will affect the job cost/invoice has been paid/month is closed. The invoice in PO is the wrong number entered while the invoice in AP is the correct number that is on the invoice.

Will I need to delink the payment to that invoice, open up the month of August, delete the invoice in AP, and do the process the correct way via PO and repost it all? How will this affect the job costing?