Rejected Goods in Subcontracting

Hello!
When I made a purchase receipt for a subcontract for 2100 items, of which 2060 was accepted and 40 rejected, the raw materials from Supplier Warehouse was reduced for only 2060 items.

I feel this is not the expected behavior. Only accepted qty is taken into consideration while calculating required qty for raw materials. This is the responsible line in code i believe:

Variable output for manufacturing cant be done easily in the system, we were planning to define BOM with qty at its upper bound and reject the rest, so supplier warehouse gets empty.

Thank you

@fahimalizain

Can you create github issue?

@fahimalizain If you have a fixed rejection you could add it to your BOM.
Rejected material may be re-usable or re-workable in some cases, so it is correct if it is still shown in supplier warehouse.

When we subcontract, we handle rejection by closing the purchase order the accepted Qty. Then we transfer rejected material to a “Supplier-Scrap Warehouse”.

This way we can keep track of the scrap also.

@rohit_w yes i will do that
@dhananjay The transfer to supplier scrap warehouse is an independent transaction which we do not want, also the valuation rate of the accepted goods should have rejected raw materials taken into consideration ?

edit: github issue Raw materials are not deducted for rejected qty in Subcontracting · Issue #12752 · frappe/erpnext · GitHub

The real issue that I faced with current client is that they receive variable output when manufacturing/subcontracting. They send out nuts for roasting. For eg. If they sent 2000kg of nuts, they can return anywhere in the range of 2010-2060kg after processing. BOM calculates exact kg after processing, which they cant use. So I followed what was suggested here in this post:

That’s when I found purchase receipt ignores rejected qty while passing the manufacturing stock ledgers.