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

Arman Schwarz armanschwarz at gmail.com
Sun Jul 11 08:03:51 EDT 2021

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>

> 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

More information about the gnucash-devel mailing list