Managing Rejected Raw Materials During Production Process

I am facing a challenge in the manufacturing process within ERPNext.

I have created a work order for 1000 pieces of an item and initiated the process by making a stock entry to issue raw materials to the Work-In-Progress (WIP) warehouse.

However, during the production process, it was discovered that 90 pieces of the caps issued are not eligible for production.

I need guidance on the following:

  1. What is the correct process to release these 90 defective caps from the production process?
  2. How should the rejected 90 caps be handled within the ERPNext system?

I would appreciate any advice or best practices on managing such situations in ERPNext. Thank you!