Skip to Content

how to find items not issued for more than 3 months and less than 9 months

items not issued for more than 3 months and less than 9 months

try below query but not working.

Select distinct t2.WhsName, T.ItemCode,T.ItemName,T.OnHand,t.U_MRPRate,t1.WhsCode,t2.WhsName
From OITM T inner join oitw t1 ON T.[ItemCode] = T1.[ItemCode]
 INNER JOIN OWHS T2 ON T1.[WhsCode] = T2.[WhsCode]
 Where not exists (Select T0.ItemCode FROM OINM T0
   WHERE T0.ItemCode =T.ItemCode
       and  T0.DocDate <  getdate()-90) and t.OnHand>0 and t2.WhsCode  in ( 'RM -RM','RM20-RM')
Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on 4 days ago

    It is actually a stock aging report:

    1. If items are not managed by Batch, aging report could generate stock balance by time interval but couldn't be detail at item level

    2. If items are managed by Batch--> stock aging can be detail by batch level

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on 3 days ago

    Hi,

    Try this query,

    Select distinct t2.WhsName, T.ItemCode,T.ItemName,T.OnHand,t1.WhsCode,t2.WhsName From OITM T inner join oitw t1 ON T.[ItemCode] = T1.[ItemCode] INNER JOIN OWHS T2 ON T1.[WhsCode] = T2.[WhsCode] Where not exists (Select T0.ItemCode FROM OINM T0 WHERE T0.ItemCode =T.ItemCode and Datediff(dd,T0.DocDate, getdate()) >=30 and Datediff(dd,T0.DocDate, getdate()) <=90 ) and t.OnHand>0 and t2.WhsCode in ('RM -RM','RM20-RM')

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded