To enable Deduct Costs on a By-Product please do the following:
Click Stock
Click Stocked Parts Menu
Click Stocked Parts Maintenance
Search for your part with By-Products
Press F6 to open the part summary
Click Assembly
Click By-Products
Press Ctrl + M to enter modify mode
Under the 'Deduct Cost' column select 'Yes'
Click OK
