How do I reverse a posted sale and deposit from prior period without affecting taxes owning?

I accidentally posted 2 sales for the same amounts, once to the prior entity and then again after a name change.  The deposit was recorded twice as well.  Bank reconciliation still shows the 2nd deposit amount and I'm looking to clear that up, but don't want to affect prior period reports.  Any suggestions?  I could post a credit note for the sale (negative invoice amount) in the current period - but will that affect the next reconciliation or would the amounts cancel out?