Skip to Content
0

Ayuda con query dias inventario

Nov 13, 2017 at 11:06 PM

25

avatar image
Former Member

Tengo este query que me es funcional para sacar los dias inventario de un almacen especifico a una fecha, pero necesito sacarlo por familia.

Alguien podria darme una mano.

SELECT ((SELECT sum(t0.transvalue) as 'Inventory Value' FROM OINM T0 INNER JOIN OITM T1 ON T0.[ItemCode] = T1.[ItemCode] WHERE T0.DocDate <= '20171031' AND T0.warehouse='GDL' ) / (SELECT DISTINCT sum(T1.[LineTotal]-T1.[GrssProfit]) FROM OINV T0 INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN NNM1 T2 ON T0.[Series] = T2.[Series] INNER JOIN OITM T3 ON T1.[ItemCode] = T3.[ItemCode] INNER JOIN OITB T4 ON T3.[ItmsGrpCod] = T4.[ItmsGrpCod] WHERE T1.[TargetType] <>'14' AND T0.[DocDate] >='20171001' AND T0.[DocDate] <='20171031' AND T2.[SeriesName]='F-GDL'))*30 as DiasInventario

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers