Hi Bill
SELECT distinct T0.[DocDueDate], T0.[CardName],T0.[DocNum],T3.[SuppCatNum], T0.[CardName],
T1.[Dscription], T3.[FrgnName], T1.[Quantity],
T2.[SlpName],T5.[descript],T7.docnum 'Invoice #',T9.docnum 'Delivery#', T0.DocNum 'SO#'
FROM ORDR T0
INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
LEFT JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
INNER JOIN OITM T3 ON T1.ItemCode = T3.ItemCode
INNER JOIN OCRD T4 ON T0.CardCode = T4.CardCode
LEFT JOIN OTER T5 ON T4.Territory = T5.territryID
LEFT join dln1 T8 on T8.baseentry = t0.docentry and t1.linenum = T8.baseline
LEFT join odln T9 on T9.docentry = T8.docentry
LEFT JOIN INV1 T6 ON T6.BaseEntry=T9.DocEntry
LEFT JOIN OINV T7 ON T7.DocEntry=T6.DocEntry
WHERE T0.[DocDueDate] =[%0] and t8.trgetentry is null
Rgds