You don’t need a Custom GL Script.
NetSuite does have standard ways to handle component scrap correctly, but they’re not always obvious.
If your scrap is expected/standard, this is the cleanest method.
• Go to your Bill of Materials (BOM)
• On each component line:
Use Yield % (or Scrap Factor)
If scrap is unexpected/variable:
During Issue Components:
• Issue more than the planned quantity
• Then complete the WO as normal
If you want scrap to hit a specific expense account:
Create an Inventory Adjustment
Reduce component inventory
• Post to a Scrap Expense account