Código SQL:
Ver original
SELECT 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:
Pero hasta el momento no e logrado restarlas... Ver original
SELECT 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