on 01-23-2010 7:01 AM
Hi Experts.
Below is the query i used to run Debtors Outstanding Balance. and its working fine but we need Amount To Reconcile Debit and Amount To Reconcile Credit Fields also..
so pls modify this query and help me...
SELECT T0.[TransId],T0.[RefDate], T0.[TransType] AS 'Origin Doc.Type', T1.[BaseRef] AS 'Origin Doc.No', T1.[ShortName], T2.[CardName],
T1.[Account], T1.[ContraAct], T1.[CreatedBy], T1.[Debit], T1.[Credit], T1.[BalDueDeb], T1.[BalDueCred], T1.[LineMemo]
FROM dbo.OJDT T0
INNER JOIN dbo.JDT1 T1 ON T0.TransId = T1.TransId
INNER JOIN dbo.OCRD T2 on T2.CardCode = T1.[ShortName]
WHERE T1.[MthDate] IS NULL AND T2.[CardName] LIKE '[%0]%'
Regards,
Vamsi
Do you mean this:
SELECT T0.[TransId],T0.[RefDate], T0.[TransType] AS 'Origin Doc.Type', T1.[BaseRef] AS 'Origin Doc.No', T1.[ShortName], T2.[CardName],
T1.[Account], T1.[ContraAct], T1.[CreatedBy], T1.[Debit], T1.[Credit], T1.[BalDueDeb], T1.[BalDueCred], T1.[LineMemo], (T1.[Debit] - T1.[BalDueDeb]) AS 'Amount To Reconcile Debit', (T1.[Credit]-T1.[BalDueCred]) AS 'Amount To Reconcile Credit'
FROM dbo.OJDT T0
INNER JOIN dbo.JDT1 T1 ON T0.TransId = T1.TransId
INNER JOIN dbo.OCRD T2 on T2.CardCode = T1.[ShortName]
WHERE T1.[MthDate] IS NULL AND T2.[CardName] LIKE '[%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.
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 | |
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.