First of all, there is no natural link from a sales order to a purchase order, so you must be using a UDF, or something to make the connection. The AP document stream usually does not connect to the AR document stream.
However, this should give you the information from the AP documents:
select distinct T0.CardName as 'Vendor Name',
T0.DocNum as 'PO Num',
T0.docstatus as 'PO Status',
T2.DocNum as 'GRPO Num',
T2.DocStatus as 'GRPO Status',
T5.DocNum as 'Inv Num',
T5.DocStatus as 'Inv Status'
from OPOR T0
inner join POR1 T1 on T0.DocEntry = T1.DocEntry
left outer join OPDN T2 on T1.TrgetEntry = T2.DocEntry
inner join pdn1 T3 on T2.DocEntry = T3.DocEntry
left outer join PCH1 T4 on T3.TrgetEntry = T4.DocEntry
inner join OPCH T5 on T4.DocEntry = T5.DocEntry
where T0.docstatus = 'O'
or T2.docstatus = 'O'
or T5.docstatus = 'O'