GnuCash XML sched-xaction split amount formatting
geert.gnucash at kobaltwit.be
Wed Apr 29 06:42:28 EDT 2015
On Wednesday 29 April 2015 11:35:42 Ngewi Fet wrote:
> In GnuCash XML, scheduled transaction splits do not have the
> <split:value/> and <split:quantities/> set. Rather the amount is
> stored as a slot with key <sched-xaction>.
> I would like to know if the formatting of this amount is (device or
> gnucash) locale-specific, or uniform across all GnuCash instances.
> For me, it is formatted as , e.g. 200,00 or 2.500,00
> Note the comma for decimal separator and period for thousands
> separator (which would be correct for my device locale but incorrect
> for my GnuCash locale which is en_US).
> The formatting doesn't seem to change when I modify the GnuCash
> Can anyone shed some light on the formatting of the split amounts of
> scheduled transactions?
> It would help when parsing GnuCash XML files in GnuCash Android.
> Ngewi F.
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
Unfortunately you hit one of GnuCash's dark corners here. The SX amount formula is stored in
gnucash in the locale that is active at that time. This has been a poor design decision (more
like on oversight probably) at the time.
It gets worse if you change locales afterwards because gnucash doesn't store the locale
information itself with the formula and hence can't convert the stored formulas to the new
locale, resulting in errors when these formulas have to be parsed.
This has been reported as a bug  which hasn't been fixed yet so far.
I'm not sure what you can do on the gnucash-on-android side to properly handle this if gnucash
itself even doesn't.
More information about the gnucash-devel