Some questions on subcontracting

Hello all,

Not been able to get subcontracting running yet and would appreciate some guidance from anyone who has worked it out.

Should I create a company for the subcontractor or is it enough to create a supplier?

Is the subcontracting initiated via a purchase order or a production order?

Is the warehouse required for subcontracting to be an internal one (my company) or does it need to belong to the newly created company for the subcontractor. (I see no other way to associate a warehouse with a subcontractor … or am I missing something?)

Can an item be both subcontracted when desired and also manufactured in house when desired or do I need to create two versions of the item? (Can I set both the subcontracting selector and the manufacture selector in the item master?)

For in house production I need to add units of labour in the operations whereas for subcontracting this should be substituted by “rate”. Does this mean that I need a separate BOM for subcontracting? I don’t see the possibility to select a BOM in the purchase order for the subcontractor. Perhaps the default BOM should then be for subcontracting? I think that one can select a BOM in an internal production order.

Wow! Enough questions for one post!

Thanks,
David

1 Like

Ok… a couple of hours later I feel that I have worked it most of it out so I will reply to my own post for the benefit of anyone with similar questions

[quote=“davidgal, post:1, topic:4019”]
Hello all,

Not been able to get subcontracting running yet and would appreciate some guidance from anyone who has worked it out.

Should I create a company for the subcontractor or is it enough to create a supplier?[/quote]

No need to create an additional company but still don’t know how to default a warehouse to a supplier.

It’s via a purchase order. Trick is to dig down to the bottom “more details” and choose “subcontract” in the appropriate selector!

[quote]
Is the warehouse required for subcontracting to be an internal one (my company) or does it need to belong to the newly created company for the subcontractor. (I see no other way to associate a warehouse with a subcontractor … or am I missing something?)[/quote]
The warehouse is an internal one but associate question is still open.

[quote]
Can an item be both subcontracted when desired and also manufactured in house when desired or do I need to create two versions of the item? (Can I set both the subcontracting selector and the manufacture selector in the item master?)[/quote]
I tried and found that the same item can be produced both in house or at a subcontractor. No differences found.

My assumptions seem to be correct on this one - to deal with cost differences in house versus subcontracting two BOMs are required. Only issue seems to be that the one for subcontracting should include only raw materials and be set as the default BOM (no possibility to select in the purchase order).

New issue: The first time association of warehouse to supplier is in the material receipt where editing to fill the source warehouse is required. Again - it would be great to be able to default this. Perhaps I missed on how to do this.

Enough for tonight.
David

Appreciate the info, thanks.

You can check https://erpnext.com/user-guide/manufacturing/subcontracting

Hello nabinhait,

Thanks for the pointer. I have read the section for subcontracting in the manual several times. It is a bit minimalistic.

Can you please guide me on a way to associate a warehouse with a supplier so that it defaults in the Purchase Receipt operation.

Should the lack of a possibility to choose the appropriate BOM while preparing the Purchase Order for a subcontracted item be a opened as an issue on git-hub?

Add a custom field for “Warehouse” in Supplier master. Then fetch the warehouse in PR in onchange event of supplier.
To learn about fetching, check Not Found

1 Like

Dear nabinhait,

I have added a new field to the supplier form - ‘supplier_warehouse’. I made it a linked field to warehouse table and it works fine.

I then added the following custom script to PR document:

cur_frm.add_fetch('supplier', 'supplier_warehouse', 'supplier_warehouse')

If I create a new PR (blank form) then on entry of the supplier code the ‘supplier_warehouse’ field updates perfectly. However in the normal workflow the PR will be created by the button in the PO. In this case the PR form is pre-filled with all the relevant data including the supplier code so the onchange event is not triggered and the supplier_warehouse field stays empty.

Same problem when creating a blank PR and then pulling data from a PO using the button at the top of the form.

Can you please suggest an additional custom script that will trigger in the case of PR being created via the PO or pulled from the PO

Thanks,
David

May be you can trigger the on_change event of supplier in onload_post_render function.

1 Like

Can that be done in an instance of ERPNext running in frappe cloud?

Yes, you can do that in frappecloud instance, no need of server side coding.