I am facing a problem in my trail balance report that it debit side credit side are not matching. It is for the current year transaction. When I run the below query there is no problem showing but when I check the report its mismatching.
select JRNENTRY, sum(DEBITAMT) - sum(CRDTAMNT) from GL20000, GL00100 where ACCTTYPE = 1 group by JRNENTRY having sum(DEBITAMT) - sum(CRDTAMNT) <> 0
Kindly advice how can I recognize the problem and fix it.
*This post is locked for comments
Thanks Mr.Richard Wheeler and Mr.Mahmoud M. AlSaadi
SELECT A.JRNENTRY , SUM(A.DEBITAMT) AS DR , SUM(A.CRDTAMNT) AS Cr , SUM(A.DEBITAMT) - SUM(A.CRDTAMNT) Variance , SUM(A.ORDBTAMT) AS ORiginal_Dr , SUM(A.ORCRDAMT) AS ORiginal_Cr, B.ACCTTYPE AccountType FROM dbo.GL20000 AS A LEFT OUTER JOIN dbo.GL00100 AS B ON A.ACTINDX = B.ACTINDX WHERE B.ACCTTYPE = 1 GROUP BY A.JRNENTRY,B.ACCTTYPE HAVING SUM(A.DEBITAMT) -SUM(A.CRDTAMNT) <> 0
I would start by getting every out of GP and then do a backup. Then Tools->Maintenance and click on Display and then Physical. Insert the Account Index Master table. After this delete data out of this table, go to Tools->Maintenance->Check Links and insert Account Master. This will rebuild your GL master tables. Try the report after performing these procedures and let us know if the report balances are now correct.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156