Por favor, revise abaixo e personalize mais se relevante:
Select T0.slpCode AS 'Código do Vendedor',T4.SlpName AS 'Nome do Vendedor',
ISNULL(Sum(T1.LineTotal),0) AS 'Vendas Totais',ISNULL(Sum(t2.LineTotal),0) AS 'Total de Notas de Crédito',
(ISNULL(Sum(T1.LineTotal),0) - ISNULL(Sum(t2.LineTotal),0)) AS 'Total de Vendas Líquidas'
from OINV T0
INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN OSLP T4 ON T4.SlpCode = T0.SlpCode
LEFT JOIN RIN1 T2 on T2.[BaseEntry] = T1.Docentry and T2.[BaseLine] = T1.[LineNum]
LEFT JOIN ORIN T3 ON T2.[DocEntry] = T3.[DocEntry]
GROUP BY T4.SlpName, T0.slpcode
ORDER BY T0.SlpCode
Atenciosamente,
Jitin