To return a part after you have raised a credit note on a WIP right click on the status Part status (X), it will then show an exclamation mark, take save. 



The part will be returned to stock and the line deleted from the WIP.