This thread isn't making any sense, there must have been other errors you're not reporting, like a database glitch or a power failure. Or somebody deleted a batch.
You "credited shipment and debited cost of sales now for the affected postings"? With a GL entry? Well, then do the same for income.