If you have posted a purchase return order as shipped, but the item is subsequently rejected, you must invoice the purchase return order so as to complete the transaction. The program creates a posted purchase credit memo in the process. Then you can issue a corrective purchase invoice to counter the posted purchase credit memo.
Create a purchase invoice for the vendor.
You can use the Copy Purchase Document batch job to copy the lines from the incorrectly posted purchase credit memo.
Creating Purchase Invoices