Flipping account types by hacking the XML

John Ralls jralls at ceridwen.us
Thu May 18 00:06:25 EDT 2017


> On May 17, 2017, at 8:53 PM, Greg Grotsky <spikeygg at gmail.com> wrote:
> 
> Hi guys,
> I'm new to gnucash and this is my first post. I am not an accountant but
> I'm learning all about double entry and whatnot. It's really cool that
> GnuCash is open source. I'm very excited about it.
> 
> I have kept a record of my stuff in an Excel file and I've converted that
> stuff to QIF and imported it. Awesome! But then I realized that the account
> types were not what I expected. I saved off a bunch of my credit cards and
> they were assigned as "bank" type. Even though I made a Credit Card
> placeholder account and put all of them in there they're all still of
> "Bank" type.
> 
> I've found that I can save the file as XML and open it with a text editor
> and find the <act:type> tag which, I believe, defines it. I'm wondering if
> there are any negative ramifications if I hack those values to be what I
> want them to be because it seems I'm unable to convert the types of
> accounts from within the GnuCash program.

The only negative ramifications will be if you change the account type between STOCK or FUND and something else, because STOCK and FUND require non-currency commodities and everything else requires currency commodities, or if you change it to a type that's not in the enum in Account.h.

Be sure that you have a good backup or three before editing your GnuCash file by hand, and test it thoroughly afterward. If you screw something up there's not likely to be any way to recover besides restoring from a backup.

Regards,
John Ralls



More information about the gnucash-user mailing list