Want to speak to you about Gnucash "account closing" bug #106383

Derek Atkins warlord at MIT.EDU
Tue Jan 22 08:50:17 EST 2008


Hi,

This should have gone either in the bug or to the gnucash-user
mailing list.  Please make sure any follow ups go there.

Lee McKusick <lmckusic at comcast.net> writes:

> Hello warlord this is Lee McKusick,
>
>    I wanted to bounce an idea off of you for an approach to doing
> "account closing" outside of the existing GnuCash tool set. 
>
>   If I can find simple tools for dumping the GnuCash data file into some
> kind of XML aware spreadsheet how about this as a way to "close out"
> expense and income entries by pointing each transaction entry at a new
> date-embedded-expense account.

Repointing each transaction would be wrong because you'd lose data.
If you did need to go back in time you'd have no idea why you
paid $237 to The Gap three years ago.

>      1. Need a function to generate that interesting Gid number.

Gid number?

>      2. Need a way to copy the entire block of Expense and expense sub
>         account names. In the copied block change all the names to "2007
>         Expense" etc. and plug in a new GID number. Keep the old GID in
>         a comment.

Wow, you ARE getting complicated.  But at least now I understand what
you mean.  For each year you want to create a NEW income/expense
hierarchy!  Unfortunately that's not quite the definition of closing
the books, but I support it could work..  Except that gnucash does get
significantly slower as you keep adding accounts.  Just go ask Don
Paolo!

>      3. Read all the transactions in the file. For every occurrence of
>         the old GID in a transaction entry, check the date, if the date
>         is 2007, change the GID to the new GID pointing to "2007
>         Expense"

You don't want to read all the transaction in the file; you would want
to iterate only through the regular account tree.  In your proposal
here you would wind up moving your 2006 transaction into your 2007
account.

>    I recently needed to close several years of income and expense
> accounts. I have accumulated about 100 sub accounts underneath the
> expense tree. 

The function in trunk will do it in two transactions back to Equity.

>    About 1/3 of the way through I started looking for a solution. I run
> Ubuntu with GnuCash version 2.0 and due to bitter experience and a lot
> at stake, I am very reluctant to jump ahead of the current package
> level.

2.2.3 is current.  The new function wont be in a release until 2.4
(unless it gets backported to a later 2.2).

>    I looked at the GnuCash data file, figured out how to gunzip it and
> loaded it into Gnumeric spreadsheet and I explored ways to do a
> "closing" using find and replace commands. 

Congrats!

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list