on 09-12-2017 7:59 AM
Hello, I've been trying to make an approval procedure with a query that if a customer has an invoice docstatus open and the docduedate is more than today; it goes to an approval procedure.
Can someone please help me? This is the code I've been using, and the orders gets accepted without being approved:
SELECT distinct 'true' FROM OINV T0 INNER JOIN OCRD T1 ON T0.[CardCode] = T1.[CardCode] INNER JOIN ORDR T2 ON T1.[CardCode] = T2.[CardCode] WHERE T0.[DocDueDate] > GETDATE() AND T0.[Docstatus]= 'o'
Thanks!!!
Hi,
Change the table OINV to ORDR in your approval and then try.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to change the query to
IF ((SELECT COUNT('A') FROM OINV T0 WHERE DateDiff(DD, GetDate(), T0.DocDueDate) > 0 AND T0.CardCode = $[$4.0.0]) > 0)
select 'true'
else
select 'false'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
5 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.