Quantcast

Flipping account types by hacking the XML

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Flipping account types by hacking the XML

Greg Grotsky
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.

Thanks,
-Greg
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flipping account types by hacking the XML

John Ralls-2

> On May 17, 2017, at 8:53 PM, Greg Grotsky <[hidden email]> 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

_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flipping account types by hacking the XML

farleykj
In reply to this post by Greg Grotsky
Another method, perhaps a tedious one, is to create the "proper" credit card account, then go into the imported transactions and redesignate the accounts of each transaction. I've done this for situations where I needed to add a "Cash" account to an investment account. It takes a while, but has the advantage that you are editing things from within the program, rather than editing the XLM code.
Ken Farley
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flipping account types by hacking the XML

Maf. King
On Thursday, 18 May 2017 13:57:03 BST farleykj wrote:
> Another method, perhaps a tedious one, is to create the "proper" credit card
> account, then go into the imported transactions and redesignate the
> accounts of each transaction. I've done this for situations where I needed
> to add a "Cash" account to an investment account. It takes a while, but has
> the advantage that you are editing things from within the program, rather
> than editing the XLM code.
>

I might be misunderstanding the problem, but isn't the (supported) way to deal
with this just to edit each account from the CoA and change the type to Credit
Card?

If there are many affected accounts, it will be a bit tedious, but I should
have thought as a one-time only job, quicker & easier than hacking & testing
on the datafile?

0.02
Maf.


_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flipping account types by hacking the XML

Derek Atkins-3
Maf,

On Thu, May 18, 2017 10:01 am, Maf. King wrote:

> On Thursday, 18 May 2017 13:57:03 BST farleykj wrote:
>> Another method, perhaps a tedious one, is to create the "proper" credit
>> card
>> account, then go into the imported transactions and redesignate the
>> accounts of each transaction. I've done this for situations where I
>> needed
>> to add a "Cash" account to an investment account. It takes a while, but
>> has
>> the advantage that you are editing things from within the program,
>> rather
>> than editing the XLM code.
>>
>
> I might be misunderstanding the problem, but isn't the (supported) way to
> deal
> with this just to edit each account from the CoA and change the type to
> Credit
> Card?
>
> If there are many affected accounts, it will be a bit tedious, but I
> should
> have thought as a one-time only job, quicker & easier than hacking &
> testing
> on the datafile?

unfortunately 2.6.16 stops you from doing that.  I would recommend you
downgrade to 2.6.15, make the changes there, and then you can come back to
2.6.16.  I'm hoping that 2.6.17 "fixes" this problem.

>
> 0.02
> Maf.

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek

--
       Derek Atkins                 617-623-3745
       [hidden email]             www.ihtfp.com
       Computer and Internet Security Consultant

_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flipping account types by hacking the XML

Maf. King
On Thursday, 18 May 2017 15:07:48 BST Derek Atkins wrote:
> Maf,
>

>
> unfortunately 2.6.16 stops you from doing that.  I would recommend you
> downgrade to 2.6.15, make the changes there, and then you can come back to
> 2.6.16.  I'm hoping that 2.6.17 "fixes" this problem.
>

Oh right.  Thanks Derek.  I'm still on .15  Certainly sounds like a bit of a
misfeature to have removed the capability...

Sorry for the noise.

Maf.


_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flipping account types by hacking the XML

Richard Ullger-2
Could you not, having created the new account, delete the old account
containing the transactions and when prompted, select the new account to
move the transactions to?

On Thu, 18 May 2017, 15:26 Maf. King, <[hidden email]> wrote:

> On Thursday, 18 May 2017 15:07:48 BST Derek Atkins wrote:
> > Maf,
> >
>
> >
> > unfortunately 2.6.16 stops you from doing that.  I would recommend you
> > downgrade to 2.6.15, make the changes there, and then you can come back
> to
> > 2.6.16.  I'm hoping that 2.6.17 "fixes" this problem.
> >
>
> Oh right.  Thanks Derek.  I'm still on .15  Certainly sounds like a bit of
> a
> misfeature to have removed the capability...
>
> Sorry for the noise.
>
> Maf.
>
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Flipping account types by hacking the XML

Eric Siegerman
On Thu, May 18, 2017 at 03:00:41PM +0000, Richard Ullger wrote:
> Could you not, having created the new account, delete the old account
> containing the transactions and when prompted, select the new account to
> move the transactions to?

That was my first thought.  But it turns out that the "delete
account" dialog only lets you move the transactions to accounts
of the same type as the one being deleted.

BTW, 2.6.15 and 2.6.16 are the same in this respect; this case
isn't part of the latter's new restrictiveness.

  - Eric
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Loading...