If July is not your year-end, you can simply unpost the GL batch, change the fiscal period to July (leaving the date unchanged), and repost.
If July is your year-end, you would probably be better off crediting the invoices in Payables using the same wrong date, and starting from square one.
Steve