Hi Shafi,
Try This
DECLARE @D1 DATETIME
DECLARE @D2 DATETIME
SET @D1= '2012-04-01 00:00:00.000'
SET @D2= '2012-04-01 00:00:00.000'
select
T0.RefDate as 'Posting Date' ,T0.DueDate ,T0.TaxDate as 'Document Date',T0.BaseRef as 'Doc.No.' ,
T0.TransId as 'Trans.No.' ,T0.Memo as 'Remarks' , T1.[ContraAct] 'OffsetAcct',
Account=(CASE WHEN T2.AcctName IS NULL THEN t3.cardname else T2.AcctName end ),
T1.Debit, T1.Credit
from OJDT T0
inner join JDT1 T1 on T0.TransId =T1.TransId
left outer Join OACT T2 ON T2.AcctCode=T1.ContraAct
left outer join OCRD t3 on t3.CardCode=T1.ContraAct
Where T0.RefDate>=@d1 and T0.RefDate<=@d2
order by T0.TransId ,t1.Line_ID
Regards
Kennedy
Hi Shafi,
Why don't you use general leddger report ?
If you want the same report with the GL report, , you can use G/L report
JM
Add a comment