on 01-31-2012 11:40 AM
Dear Experts,
I have created a query based alert for the cash payment where invoice amount and payment not tallied then from system alert message should generate.
This is my Query:
SELECT T1.[Series],T1.[DocNum], T1.[DocDate], T1.[CardCode], T1.[CardName],T1.[CashAcct], T1.[CashSum], T1.[NoDocSum] as "BalanceDue", (T1.[CashSum] - T1.[NoDocSum]) as "InvoiceAmount"
FROM [dbo].[OVPM] T1 WHERE isnull(T1.[CashAcct],'')<>'' and T1.[NoDocSum]<>0 and T1.[CashAcct]='ACH0000001' and (T1.[CashSum] - T1.[NoDocSum])<> 0
Please check and suggest your opinion in case of correction required
Thanks in advance...
Regards,
Agranshu
Hi Agranshu,
Try:
SELECT T1.Series,T1.DocNum, T1.DocDate, T1.CardCode, T1.CardName,T1.CashAcct, T1.CashSum, T1.NoDocSum as 'BalanceDue', (T1.CashSum - T1.NoDocSum) as 'InvoiceAmount'
FROM dbo.OVPM T1
WHERE T1.NoDocSum !=0 and T1.CashSum !=0 and (T1.CashSum - T1.NoDocSum) != 0 and T1.CashAcct='ACH0000001'
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Agranshu
Try below query...............
SELECT T1.Series,T1.DocNum, T1.DocDate, T1.CardCode, T1.CardName,T1.CashAcct,
T1.CashSum,
T1.NoDocSum as "BalanceDue", (T1.CashSum - T1.NoDocSum) as "InvoiceAmount"
FROM dbo.OVPM T1 WHERE T1.CashAcct='ACH0000001' and (T1.CashSum - T1.NoDocSum)= 0
Reagrds
Kamlesh Naware
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.