Select Sum(CAD.materialprice), SUM(CAD.workprice)
from plmcooperationad CAD where CAD.PArent_ID In
(Select COO.ID from PLMCoopOutputItems MI
inner Join plmcooproutines R On R.Parent_ID=MI.id
inner join plmjobordersroutines JOR on r.jobordersroutine_id = JOR.id
inner join plmcooperations COO on mi.parent_id = coo.id
where Coo.joborder_id =:OBJID)
Generated by ABRA Software a.s. 27.10.2021 16:34:49