Hi Experts,
You expert help and suggestions are required to fix the below issue.
User has registered the line item and then removed line from PO.
Item status is registered in inventory transactions and it has been sold and invoiced in sales order. Now user wants to post product receipt for the registered quantity and invoice the PO.

Kindly advice how to deal with the above situation and how to prevent this from happening in near future.
Application D365 F&O (Cloud), version 10.0.25. (10.0.1149.40)