GnuCash XML sched-xaction split amount formatting

Geert Janssens geert.gnucash at kobaltwit.be
Thu Apr 30 12:22:53 EDT 2015


On Thursday 30 April 2015 17:57:05 Ngewi Fet wrote:
> >> Oh, I didn't realize you were attempting to process the SXes in the
> >> Android app!!  That changes things; I just assumed you wanted to
> >> make
> >> sure you could read the GnuCash XML data and then re-write it back
> >> out again.
> >> 
> >> *ponders*
> 
> Yes indeed, we are parsing the scheduled transactions and generating
> any missed ones. Then we also maintain the schedule in the app as
> long as the file is loaded in the database.
> >> Too bad you can't just incorporate the GnuCash engine (and file
> >> backend) C code directly into your App.  ;)
> 
> That would be cool, although I don't know what the effort would be to
> hook into it. In what format does GnuCash handle it's data
> internally? SQL database? The SQL schema in the Android version is
> already similar and could be made even more so. Having the same code
> generating XML would definitely ease things. But I guess that's a
> rather looong term goal as Geert says.
> > One of the long-term goals... However it will be c++ code by then.
> > We'd love some more help getting the conversion done btw.
> 
> Does this conversion require extensive knowledge of the Gtk framework
> and the scheme language?

In general no. The engine doesn't have any gtk code by design. In a few 
spots it is still dependent on guile code unfortunately, but those parts 
should also be rewritten in c++.
So for most part it's c to c++. There is plenty of work to do that 
doesn't touch scheme at all.

> > More on topic though:
> > Ngewi, you write that you intend to generate the transactions when
> > an SX is due. Knowing that gnucash will also create these
> > transactions, independently from GoA when they are due, won't this
> > cause duplicate entries when importing back from GoA to gnucash on
> > the desktop ?
> The scheduled transactions XML tracks things like the last run time,
> number of executions pending etc etc. We update all of that
> information as well. I assume GnuCash looks at this before deciding
> if and how many transactions to generate from the scheduled template.
> That way there will be no duplicates. But please correct me if I'm
> wrong.
> 
It depends. If you can update this information directly in the xml data 
file before gnucash loads it, that would indeed be the case.

I thought however that the way to transfer from GoA to gnucash on 
desktop was via export-import. That is, gnucash imports data being 
exported from GoA ? If that is so the SX code will already have 
triggered before the user can import the updated information. Hence 
duplicate transactions...

Geert

> Regards,
> Ngewi



More information about the gnucash-devel mailing list