on 07-28-2015 8:02 AM
Hi.i want alert,when a customer put any sales order,that sales order Doctotal plus customer balance should not exceed the customer credit limit.I tried it,But it show all the sales order document,i need only current added document.
My Query is this ....
SELECT A.DOCNUM,B.CARDCODE,B.CardName,
A.DocTotal,B.CreditLine'CREDIT LIMIET',B.Balance'A/C BALANCE' FROM ORDR A
INNER JOIN OCRD B ON A.CardCode=B.CardCode
where (A.DocTotal+B.Balance)>B.CreditLine
Please let me know where i am getting wrong.
Hi Dinesh
Go to Alerts management ..
Below Frequency Select as minutes in dropdown list & Type 1 in the empty field & Update
Regards, K.Ramasamy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I got answer
the query is...
SELECT A.DOCNUM,B.CARDCODE,B.CardName,
A.DocTotal,B.CreditLine'CREDIT LIMIET',B.Balance'A/C BALANCE' FROM ODLN A
INNER JOIN OCRD B ON A.CardCode=B.CardCode
where (A.DocTotal+B.Balance)>B.CreditLine and convert(varchar(10),a.CreateDate,110)= CONVERT(VARCHAR(10),GETDATE(),110)
and a.DocTime>=replace(Convert(nvarchar(5),GetDate(),108),':', '')-1
Thanks for all...
Thanks
dinesh.
Hi,
Try:
SELECT A.DOCNUM,B.CARDCODE,B.CardName,
A.DocTotal,B.CreditLine'CREDIT LIMIET',B.Balance'A/C BALANCE' FROM ORDR A
INNER JOIN OCRD B ON A.CardCode=B.CardCode
where (A.DocTotal+B.Balance)>B.CreditLine AND DateDiff(DD, A.DocDate,GetDate())=0
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
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.