Skip to Content
0

Alerts for Open Purchase Orders

Apr 19, 2017 at 10:34 AM

46

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Balaji Selvaraj Apr 19, 2017 at 11:36 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Markus Schaefer Apr 19, 2017 at 02:37 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded