Showing One Warehouse Stock

    Hi Experts,

     

    I am looking to show just WHSE 100 stock for ‘In Stock’ column.

     

    SELECT t3.slpname as “Sales Rep”, t0.Cardcode as “Customer#”, t0.Cardname as “Customer Name”, t0.DocNum as “SO #”, t1.ItemCode, t0.DocDate, t0.DocDueDate, Convert(numeric, GetDate())-convert(numeric, T0.DocDueDate ) “Days Overdue”, t1.OpenQty, t1.OpenQty*T1.price AS ‘Open Value’, t2.onhand FROM dbo.ORDR t0 INNER JOIN dbo.RDR1 t1 on t1.docentry = t0.docentry INNER JOIN OITM t2 on t1.itemcode=t2.itemcode Inner join oslp t3 on t0.slpcode = t3.slpcode WHERE t1.LineStatus = ‘O’ AND t1.OpenQty > 0 AND t2.QryGroup20=’Y’ and t0.docduedate >= [%1] and t0.docduedate <= [%2]

     

     

    Add Comment
    0 Answer(s)

    Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.