Direct Delivery intercompany invoice not posted

I have an intercompany return order that was processed through direct-delivery. Problem is session crashed during process and the intercmopany invoice was not created. If the Company B transactions are now all invoiced how do I get Company A’s sales order to invoice and the RMA to close.

Company A RMA status Open

Company A Sales Order status Delivered

Company A Purchase Order status Invoiced

Company B RMA status Closed

Company B Sales Order status Invoiced