Skip to Content
avatar image
Former Member

Ayuda con query dias inventario

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers