[GNC-dev] How do I get the "sign" (or side) of the transaction from the account or transaction element in xml?

D. sunfish62 at yahoo.com
Sun Jul 11 08:50:16 EDT 2021


I'm not sure I follow your issue, but I'll note that the list of types of accounts in GnuCash is outlined in the Help docs in Chapter 5 at https://code.gnucash.org/docs/C/gnucash-help/acct-types.html

There are 13 types listed there. 


-------- Original Message --------
From: Arman Schwarz <armanschwarz at gmail.com>
Sent: Sun Jul 11 08:03:51 EDT 2021
To: Geert Janssens <geert.gnucash at kobaltwit.be>
Cc: gnucash-devel at gnucash.org
Subject: Re: [GNC-dev] How do I get the "sign" (or side) of the transaction from the account or transaction element in xml?

Ok I'll take a look myself, thanks for pointing me in the right direction.

On Sun, 11 Jul 2021, 9:50 pm Geert Janssens, <geert.gnucash at kobaltwit.be>
wrote:

> Op zondag 11 juli 2021 13:38:43 CEST schreef Arman Schwarz:
> > Thanks Geert,
> >
> > I'm aware of the need to think in terms of debit/credit signs, but my
> > question was how I could know whether a positive value in the split
> element
> > in the XML will increase or decrease the "balance" that the user sees in
> > gnucash.
> >
> > This depends on the side of the accounting equation the account is on,
> e.g.
> > positive split values increase the balance of an asset account, but
> > decrease the balance of an income account. Rather than manually
> maintaining
> > a mapping of account types and whether the sign is positive or negative,
> I
> > was hoping there'd be something in the XML or perhaps in those bindings
> you
> > mentioned that would do this for me.
> >
>
> I don't think this is stored in the xml file as the net representation in
> the
> gui is a combination of account type and the user preference. The former
> is
> hard-coded, the latter can be changed by the user. I don't know if we can
> access either information via the python bindings. I don't use them myself.
>
> Regards,
>
> Geert
>
>
>
_______________________________________________
gnucash-devel mailing list
gnucash-devel at gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


More information about the gnucash-devel mailing list