on 05-26-2017 8:24 AM
Hi All
in our business, it may take multiple deliveries before a Sales Order is completed and closed. I've managed to write the following query (with my limited skills) but it would only appear to pick up a Sales Order that is closed when delivered in full by a single delivery....
SELECT T0.[DocNum], T0.[CardCode], T0.[CardName],T0.[UpdateDate] AS 'Closed On' FROM ORDR T0 WHERE T0.[DocStatus] ='C' AND T0.[UpdateDate] >= GETDATE () - 4
I want to be able to produce a report that is triggered when the Sales Order is closed as a result of the last delivery to close that order.
Could anyone assist please?
Many thanks
Derek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Derek,
It seems you want to know last delivery date against sales order.
You can make join with Delivery (ODLN & DLN1) by baseentry and baseline and find max delivery date by group by and having clause.
Regards,
Zuber Kazi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.