So you have posted the shipment, but not the receipt and you have deleted the transfer order?
If yes, then you must either create a new transfer order, to transfer it from the in-transit location. Or just use an item journal to change the location codes.