[GNC] solved: Order of accounts when closing the book
Stan Brown (using GC 4.14)
stan+gc at fastmail.fm
Sat Jun 21 17:14:13 EDT 2025
On 2025-06-09 21:36, Stan Brown (using GC 4.14) wrote:
> The Close the Book tool generates two transactions, one for all income
> accounts and the other for all expense accounts. The accounts are not in
> alphabetical order in either transaction, nor are they in Account Code
> order, nor arranged by the values of the splits.
>
> They _seem_ random, but I can't imagine they really are. Can anyone tell
> me (a) how they're actually sorted, and (b) how I can get them in
> Account Code order?
Thanks again to those who responded. For them, and for others who may be
interested, and for the archives, here is how I resolved this.
I have set up a scheduled transaction (SX) that fires on the last day of
each December. It contains a few dozen simple transactions, one per
income or expense account. (Yes, a SX can contain more than one
transaction.) This is different from "Tools: Close Book", which makes
one big transaction of many splits for all income accounts and a similar
one for all expense accounts.
Each transaction in my SX is either a debit to an income account and a
credit to the Net Worth:Ordinary Income account, or a debit to Ordinary
Income and a credit to an expense account. I felt it would be easier
this way to enter the necessary figures (see next paragraph) and to
correct errors if I belatedly discover I accidentally posted an item to
the wrong account. The Description field of each transaction is
"Ordinary income summary"; in my income statement in Saved Report
Configurations, the Options » Entries tab is set to ignore any
transaction with that Description. The Num field of each transaction is
the Account Code of the income or expense account; this keeps the
closing transactions in the order I want, which is Account Code order.
And since I use Num values starting at 1 on each day for "real"
transactions (non-closing transactions) and account numbers are all in
the 1000-5999 range, the closing transactions as a group will follow any
other recorded activity on Dec 31st.
When my closing SX fires, I open the Ordinary Income account in a
register in Basic view, click the first transaction, and click Jump.
This takes me, not just to the income or expense account, but to the
closing transaction of the income or expense account. I can then see the
year-end balance and enter it as a debit or credit to close that
account. (Any typo will be obvious because the new balance won't be
zero, so I can fix it right away.) I then close that register, which
takes me back to Ordinary Income, and repeat for the next account in
sequence. It takes surprisingly little time to run through all income
and expense accounts in this manner.
During the discussion in this list, I brought up my issue of
Extraordinary Income (or Items). After some hard thinking I decided that
I didn't really need that category. It existed so that lenders and
investors could look at a company's income statement free of distortion
by items that are not part of normal operations. Well, I'm not a
company, so no one would be investing in me, and lenders have their own
forms for applicants' income and expenses. (And I discovered that even
companies don't use Extraordinary Items any more, since the standards
bodies have eliminated them.)
I do have some nonrecurring income or expense items, which are in a few
child accounts of Income:Nonrecurring Items. Note: Income, not Equity
account as Extraordinary Income was. For my own use I have two Saved
Report Configurations of the income statement: one selects all accounts
("Comprehensive Income Statement") and the other selects all except
Nonrecurring Items and its children (Ordinary Income Statement).
The year-end Income:Nonrecurring subaccounts are closed to Net
Worth:Changes in Net Worth, not to Net Worth:Ordinary Income. Ordinary
Income is also closed to Changes in Net Worth.
I was unsure where to account for unrealized gains and losses on
investments, which can be quite large in some years. In some googling I
saw a suggestion to make Unrealized Gains/Losses an equity account, and
I've adopted that suggestion. From year to year this account accumulates
the unrealized gains or losses; it is not closed to the main Net Worth
account -- that just hit me as I was writing this note.
Note: I don't use trading accounts, just ordinary Asset accounts for
my investments. I started tracking them in an Excel workbook before I
knew of GnuCash, and I've kept using it. I record investments,
withdrawals, and realized gains and losses in Excel and GnuCash as they
occur; I record unrealized gains and losses in Excel several times a
quarter, and in GnuCash at the end of each quarter.
It took several days to think about the above, then several more to
refactor my existing book, containing years 2018 to present, to the new
schema. I ran balance sheets and income statements on a backup copy, and
compared them year by year with the same statements in the new,
refactored book.
Maybe I'm the only one who is interested in any of this, but if you've
read this far and have any questions or suggestions I'd be happy to hear
them. If nothing else, this is a good illustration of GnuCash's
flexibility!
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
More information about the gnucash-user
mailing list