Skip to Content
avatar image
Former Member

Alerts for Open Purchase Orders

Hi SDK Experts!

I need help with two alert queries, for Open Purchase Orders. The first one is an alert query for open purchase orders 5 days before the due date, and the second is the day before the due date is reached.

Thank you.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 19, 2017 at 11:36 AM

    Hi,

    Select DocNum, CardName, DocTotal FROM OPOR Where Docstatus='O' and DocDueDate > DateAdd(dd,4,GETDATE())

    You can change number as per need from duedate

    Regards:

    Balaji.S

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 19, 2017 at 02:37 PM

    Hi,

    if you have different shipdates inner your purchaseorder-Positions you can use the MIN(shipdate):

    Select T0.DocEntry, T0.CardName, MIN(T1.ShipDate)
    FROM OPOR T0
    INNER JOIN POR1 T1 on T0.DocEntry = T1.DocEntry
    Where T1.LineStatus = 'o' and (T1.ShipDate) <= (getdate()+5)
    GROUP BY T0.DocEntry, T0.CardName
    
    
    
    

    best regards

    Markus

    Add comment
    10|10000 characters needed characters exceeded