The Ending Balance is not stored. The data you are looking for would need to be accumulated from data in the GL_PeriodPostingHistory table. Each record stores the Debit and Credit amount for an Account/Year/Period. In addition, it will store the beginning balance for the year in the Period One record. If you want the Beginning Balance for period four, you would need to read periods one, two and three. Add the BeginningBalance buckets (which will be zero for all periods except One) to the DebitAmount Buckets and subtract the CreditAmount buckets. Adding the DebitAmount and subtracting the CreditAmount for period four would then give you the ending balance for period four.
↧