Operation cost included in BOM and how link it with Payroll Entry

I had made Bill of Materials included operation cost ( employee cost ) when i make Production Order and end it with stock entry (Manufacture) , it transferred to ( Expenses Included In Valuation ) in cr side.
I need to link operation cost with ( Payroll Entry ) how i can do that ??
I need to know how i can calculate (cost of production) for every product which include indirect costs
to make pricing , but i don’t know how make that using ERP next??