Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

GP 2010 Looking for clue Checkbook balance off from GL Cash Account Balance

Posted on by 75,730
We are trying to track down reasons why the checkbook balance and the GL cash account balance is different. SELECT * FROM CM20200 WHERE CHEKBKID='MYCHECKBOOK' returns 5140 records SELECT * FROM GL20000 WHERE ACTINDX=7991 ORDER BY TRXDATE returns 3937 records So I need to find out which transactions are missing from the GL20000 that do exist in the CM20200 table. Does anyone know the exact table relationships between these two tables so we can develop a script to isolate the differences?

*This post is locked for comments

  • Mahmoud Saadi Profile Picture
    Mahmoud Saadi 32,738 on at
    RE: GP 2010 Looking for clue Checkbook balance off from GL Cash Account Balance

    That's absolutely precise, when either a payment or cash receipt is issues from either SOP or POP modules on a specific checkbook, the script above will fail to consider the matching.

    I have just tested several case scenarios in which the matching was invalid. I will be working on it to cover these special cases,

    I will keep you updated.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: GP 2010 Looking for clue Checkbook balance off from GL Cash Account Balance

    Mahmoud, I have found a series of transactions that took me a while to find out what they we doing but it breaks the link between the CM20200.SRCDOCNM and GL20000.ORCTRNUM fields. Apparently when they know they are going to be paying the payables transactions off by ACH when they enter the payables transaction, they enter the amount of the transaction in the cash field and then choose the checkbook. When they do that, the value now moves from the GL20000.ORCTRNUM  into the GL20000.ORDOCNUM field. The problem I have with that is trying to locate the field that indicates this was done. I have not been able to locate that field.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: GP 2010 Looking for clue Checkbook balance off from GL Cash Account Balance

    Thank for this, Mahmoud. On my system, in two..CM20200 there are 2095 records. When I run this script it returns all 2095 record. I will play around with this and refine it to return only the missing transactions.

  • Mahmoud Saadi Profile Picture
    Mahmoud Saadi 32,738 on at
    RE: GP 2010 Looking for clue Checkbook balance off from GL Cash Account Balance

    Sir Richard,

    I have just done this on Fabrikam without thorough testing actually. It might need further revision;

    SELECT  A.CHEKBKID ,

            A.TRXDATE ,

            A.TRXAMNT ,

            A.SOURCDOC ,

            A.AUDITTRAIL ,

            D.ACTNUMST ,

            E.ACTDESCR ,

            C.JRNENTRY ,

            C.ORGNTSRC ,

            C.ORCTRNUM ,

            CASE WHEN C.DEBITAMT = 0 THEN C.CRDTAMNT

                 ELSE C.DEBITAMT

            END AS GLAmount ,

            C.DEBITAMT ,

            C.CRDTAMNT ,

            ISNULL(CASE WHEN C.DEBITAMT = 0 THEN C.CRDTAMNT

                        ELSE C.DEBITAMT

                   END, 0) - A.TRXAMNT AS VARIANCE

    FROM    CM20200 AS A

            LEFT OUTER JOIN CM00100 AS B ON A.CHEKBKID = B.CHEKBKID

            LEFT OUTER JOIN dbo.GL20000 AS C ON A.AUDITTRAIL = C.ORGNTSRC

                  AND A.SRCDOCNUM = C.ORCTRNUM

                  AND B.ACTINDX = C.ACTINDX

            LEFT OUTER JOIN GL00105 AS D ON C.ACTINDX = D.ACTINDX

            LEFT OUTER JOIN dbo.GL00100 AS E ON E.ACTINDX = D.ACTINDX

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: GP 2010 Looking for clue Checkbook balance off from GL Cash Account Balance

    Yes, that is correct. My script is now failing at these customized relationships. I have opened a case with MS. I am sure they have already written this script. No sense reinventing the wheel. We have thousands of transactions to go through.

  • Tim Foster Profile Picture
    Tim Foster 8,515 on at
    RE: GP 2010 Looking for clue Checkbook balance off from GL Cash Account Balance

    Looks like you could start with

    GL20000.ORGNTSRC matching to CM20200.AUDITTRAIL

    The relationships with GL20000 are dependant on Series and Type.  When GP "backtracks" from GL to source, it figures out where the transaction started and uses a customized relationship.

    Tim

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,104 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans