Rapor Üreticiden şu SQL kodlarını kullanarak bir rapor oluşturabilirsiniz."114" yerine kendi firma numaranızı yazmalısınız.
SELECT
S.SPECODE AS OZKOD,
S.CODE AS KOD,
S.NAME AS ACIKLAMA,
S.G_STOK AS GUVENLI,
S.A_STOK AS AZAMI,
S.M_STOK AS ASGARI,
S.GELECEK,
S.STOK,
(S.M_STOK-S.STOK-S.GELECEK) AS IHTIYAC
FROM (SELECT
MLZ.SPECODE,
MLZ.CODE,
MLZ.NAME,
ISNULL((SELECT A.SAFELEVEL FROM LG_114_INVDEF AS A WITH(NOLOCK) WHERE INVENNO=99 AND A.ITEMREF=MLZ.LOGICALREF),0) AS G_STOK,
ISNULL((SELECT A.MAXLEVEL FROM LG_114_INVDEF AS A WITH(NOLOCK) WHERE INVENNO=99 AND A.ITEMREF=MLZ.LOGICALREF),0) AS A_STOK,
ISNULL((SELECT A.MINLEVEL FROM LG_114_INVDEF AS A WITH(NOLOCK) WHERE INVENNO=99 AND A.ITEMREF=MLZ.LOGICALREF),0) AS M_STOK,
ISNULL((SELECT ACTPORDER FROM LV_114_01_GNTOTST AS M WITH(NOLOCK) WHERE M.INVENNO=99 AND M.STOCKREF=MLZ.LOGICALREF),0) AS GELECEK,
ISNULL((SELECT ONHAND FROM LV_114_01_GNTOTST AS M WITH(NOLOCK) WHERE M.INVENNO=99 AND M.STOCKREF=MLZ.LOGICALREF),0) AS STOK
FROM LG_114_ITEMS AS MLZ WITH(NOLOCK)
WHERE MLZ.ACTIVE=0 AND MLZ.CARDTYPE<>22 AND MLZ.SPECODE<>'')
AS S WHERE (S.M_STOK-S.STOK-S.GELECEK)>0