Buenos dias a ver si me echan una mano con este tema, tengo la consulta de las ventas.
Código SQL:
Ver originalSELECT T0.[ItemCode], T0.[Dscription], SUM(T0.[Quantity])
FROM INV1 T0 INNER JOIN OINV T1 ON T0.[DocEntry] = T1.[DocEntry]
WHERE T1.[DocDate] BETWEEN '01-01-2016' AND '31-01-2016'
GROUP BY T0.[ItemCode], T0.[Dscription]
ORDER BY T0.[ItemCode] ASC
Y las devoluciones
Código SQL:
Ver originalSELECT T2.[ItemCode], T2.[Dscription], SUM(T2.[Quantity])
FROM RIN1 T2 INNER JOIN ORIN T3 ON T2.[DocEntry] = T3.[DocEntry]
WHERE T2.[DocDate] BETWEEN '01-01-2016' AND '31-01-2016'
GROUP BY T2.[ItemCode], T2.[Dscription]
ORDER BY T2.[ItemCode] ASC
Pero hasta el momento no e logrado restarlas...