--i don't know relation but i have tried for OP
select c.catnm,i.itemnm,i.opnstk,u.untnm,(i.ITMcgst*2) as StkGSTRate,
(select sum(PDQty )As purchaseQty
FROM TBL_pur_invdet T where p_type='P' AND
T.ItemIDpur=pd.ItemIDpur group by ItemIDpur,p_type) AS purchasequantity,
(select sum(sDQty )As SaleQty
FROM TBL_sale_invdet T where S_type='S' AND
T.ItemIDsale=pd.ItemIDpur group by ItemIDsale,S_type) AS salesQty,
(select sum(PDQty ) As purchaseReturnQty
FROM TBL_pur_invdet T where p_type='PR' AND T.ItemIDpur=pd.ItemIDpur group by
ItemIDpur,p_type)AS PurchaseReturns,
(select sum(sDQty )As SaleReturnQty
FROM TBL_sale_invdet T where S_type='SR' AND T.ItemIDsale=pd.ItemIDpur group by
ItemIDsale,S_type) AS saleReturns
from tbl_item as i
INNER JOIN tblcat AS c ON c.catid=i.ITMcatid
INNER JOIN tblsubcat AS sc ON sc.subcatid=i.ITMsubcatid
INNER JOIN tblUnit AS u ON u.untid=i.ITMcatid
INNER JOIN TBL_pur_invdet AS pd ON pd.ItemIDpur =i.itemid