Sub-Contracted values

We manufacture hydraulic products. Before completing the final product, sub-items will act on series of steps and subcontract. For each sub-item some cost is added. The subcontracted items are purchased from supplier for the charges they levied.
Can anyone tell me how these sub-contracted items are treated here?
How to get total charges after purchase? (item price before subcontract+purchase value=total price after purchase?)

Regards
Santosh

@santosh_baburao have you seen this?

Thanks Rushab.
I have gone through the video, but I request you to look at the example.
Final product is processed in 5 steps:
raw material used for 1 product= 50 Rs.
cost of 1st process= 10 Rs, total cost of 1st step=50+10=60 Rs (product 1)
cost of 2nd process= 10 Rs, total cost of 2nd step=60+10=70 Rs (product 2)
cost of 3rd process= 10 Rs, total cost of 3rd step=70+10=80 Rs (product 3) Sub-contracted
cost of 4th process= 10 Rs, total cost of 4th step=80+10=90 Rs (product 4)
cost of 5th process= 10 Rs, total cost of 5th step=90+10=100 Rs (final product)
As Product 3 is sub-contracted, purchase order to be released for what value? If PO is released for 10 Rs, cost value in stock ledger and stock report will not match. If PO is released for 80 Rs, accounting shows 70 Rs payable to supplier.

Thanks
Santosh

Raise PO for 10. ERPNext will add value of raw materials in stock. You can try it.

I am using virtual image of ERPNext-241114, here there is no option for supplying the raw material for sub-contract item. If PO is released, it considers as a new purchase and takes the value of purchase rate in stock ledger.

Thanks.
It works in new virtual image.