Sage 100

 View Only
Expand all | Collapse all

Inconsistent general ledger trial balance?

  • 1.  Inconsistent general ledger trial balance?

    Posted 06-09-2025 20:12

    I have a client on 2023 Premium.

    This morning the client noticed that when printing a G/L trial balance including zero balance accounts that it is out of balance.

    If excluding a G/L trial balance excluding zero balance accounts it is in balance.

    We noticed that when including zero balance accounts some accounts are missing including a 3.4 million bank account.

    To make it even more interesting we can sometimes print with zero balance accounts and be in balance,, but immediately print again and it will be out of balance.  

    What's the definition of insanity?  Doing the same thing twice and expecting different results.   We're managing to actually do that!

    We tried a rebuild sort files. Which we at first thought fixed the problem until we ran the report a second time.

    In a backup database, we ran the recalculate balances and that made things even worse.  We are out of balance both including and excluding zero balances by a different amount than the original.  Glad we didn't do it on the live database.

    Any thoughts?



    ------------------------------
    Thomas Rogers (TomTarget)
    Target System Technology, Inc.
    ------------------------------


  • 2.  RE: Inconsistent general ledger trial balance?

    Posted 06-09-2025 21:16

    In that test company, reinitialize the GL_PeriodPostingHistory table and run the recalculate again, then compare results.  My guess is that the report filter is hiding some bad data in the table, and the recalculate "fixed" some of it.  The recalculate utility doesn't delete bad rows, only recalculates good rows, which is why you need the reinit.

    If you want to do the verification in SQL, look at the GL_PeriodPostingHistory data, compared with a sum of all DR-CR transactions, from the beginning of time, for each account.



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 3.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 10:49
    HI Tom
       I have a client that is on premium and has about 10 companies.   They had an issue where transactions were missing from the GL detail transaction report causing the reports to show out of balance.  The transactions were shown in account inquiry.    They are on 2019 so I was limited in being able to bring in Sage on it.    Along the way someone and I wish I could remember who told me that in Premium issues with the SQL logs can cause issues like this.   In order to do some transactional testing, I backed up the company and then copied it to another company.   After I did this, the issue went away.  My only thought is that the backup cleared some of the SQL logs.   Still no explaination.   Nathan Shaw replied to my email after if was solved and even he had no insight to the issue.     Worth a shot & good luck! 
     
    Bob Osborn
    ,
    MCSE
    Sr. Consultant, Sage 100 
    e:
    p:
    s:
    What's New in Sage 100 2025
     
        





  • 4.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 11:58

    Bob,  

    When you say you backed it up and restored to another company, are you referring to a different company code?

    We have a production environment and a test environment.  We backed up from the production environment and restored to the test environment but using the same company code and sql database name..



    ------------------------------
    Thomas Rogers (TomTarget)
    Target System Technology, Inc.
    ------------------------------



  • 5.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 12:14
    Hi Tom
      I backed up the database out of an abundance of paranoia..    This was a few months back, so I am not 100% sure of the order that I went in.   The two things I know for sure is that the copied company did not have the issue and that the live company issue went away after it was backed up.     In both cases I believe that the SQL logs get "cleaned up".     

     
    Bob Osborn
    ,
    MCSE
    Sr. Consultant, Sage 100 
    e:
    p:
    s:
    What's New in Sage 100 2025
     
        





  • 6.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 12:50

    But did you restore to the same company code?



    ------------------------------
    Thomas Rogers (TomTarget)
    Target System Technology, Inc.
    ------------------------------



  • 7.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 12:52

    The odd thing is that the differences are accounts simply disappearing, not changed balances in the accounts.

    In SQL where do the work tables get created?  I previewed the report and I could find the work tables anywhere like we do in the PVX environment.



    ------------------------------
    Thomas Rogers (TomTarget)
    Target System Technology, Inc.
    ------------------------------



  • 8.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 13:00

    Work tables are in tempdb.



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 9.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 13:27

    Thanks Phil



    ------------------------------
    Thomas Rogers (TomTarget)
    Target System Technology, Inc.
    ------------------------------



  • 10.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 13:35

    Looking into the temporary work table,  we can see that the missing accounts are just not being generated.

    But why on earth is it that sometimes the accounts are there and other times not?  Grumble.



    ------------------------------
    Thomas Rogers (TomTarget)
    Target System Technology, Inc.
    ------------------------------



  • 11.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 13:31

    More interesting info.

    If you use the explorer function to look at Accounts, the accounts that are randomly disappearing do not show up.

    Looking into the SQL database itself we can see that the accounts in question are more newly created accounts based on looking at the accountkey.



    ------------------------------
    Thomas Rogers (TomTarget)
    Target System Technology, Inc.
    ------------------------------



  • 12.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 16:23

    Look in SQL at the Columns under dbo.GL_Account and see if the fields are listed and look at the data type for each field to be sure it looks correct.  For example, AccountKey (PK,varchar(9), not null) 



    ------------------------------
    Doug Higgs
    Midwest Commerce Solutions, Inc
    (312) 315-0960
    Chauffeur, Chef, and Personal Assistant to Sprinkles
    ------------------------------



  • 13.  RE: Inconsistent general ledger trial balance?

    Posted 06-10-2025 16:42

    My thought is there may be something amiss with the SQL schema.  See this web site for queries that display schema info:  

    https://medium.com/@smita.s.kothari/how-to-get-the-data-type-and-column-information-about-a-table-in-sql-server-solutions-to-common-8a327d9ce301



    ------------------------------
    Doug Higgs
    Midwest Commerce Solutions, Inc
    (312) 315-0960
    Chauffeur, Chef, and Personal Assistant to Sprinkles
    ------------------------------