on 09-01-2015 7:43 AM
Hii everyone,
I am having one ledger query in which i want opening balance please help me .
this is my query----------------------------------
Declare @Todate as Datetime
Declare @fromdate as Datetime
set @fromdate = ( select Min(ta.refdate) from OJDT ta where ta.refdate = [%0])
set @Todate = ( select Max(tb.refdate) from OJDT tb where tb.refdate = [%1])
SELECT DISTINCT T0.[RefDate], T0.[TransId],
T3.[AcctName] 'GLName/BPName'
, T1.ContraAct'OffsetAccount',T1.[LineMemo]'Details',
T1,Credit , T1.Debit, (T1.Credit - T1.Debit) as closing balance
FROM OJDT
T0 INNER JOIN JDT1 T1 ON T0.[TransId] = T1.[TransId]
INNER JOIN OACT T2 ON T1.[Account] = T2.[AcctCode]
INNER JOIN oact t3 ON t3.AcctCode=t1.ContraAct
Left Outer Join OCRD T4 on T1.shortName = T4.CardCode
WHERE T0.[RefDate] BETWEEN @fromdate AND @todate and T4.CardName =N'[%2]'
ORDER BY T0.[RefDate]
-----------------------------------------------
Please help me to make this report .
Thank you
Neelima
Hi Neelima
Check the below link it may helps you
With Regards
Balaji Sampath
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.