OK, first off, I have to agree with Janusz. It's not really the way to go by accessing the database directly, especially if I have to redo all the work every time a major new upgrade comes out.
We have used a variety of windows/unix/web accounting programs over the last 14 years and frontaccounting is by far the best we have used for our purposes. I keep thinking that gnue will go somewhere, but it been 14 years and counting since I started following that. Whatever we do, it has to work with frontaccounting.
Here is what we are trying to do...
We are running two business under 1 set of books. We have two DBA names because the businesses are so different and unrelated (Bookbinding and Wireless High Speed Internet).
Frontaccounting is set up under the Bookbinding business because that is the main one. The Wireless is a side effort but uses a different name because, lets face it, who would by Internet access from a old book guy :-)
Anyway, we have the bandwidth and threshold usage stored in an autogenerated rrd database. We also have a list of customers stored in a mysql database with what services they get billed for very month.
What I wanted was a script that would access the autobill information from mysql, then access the rrd database and determine if any additional bandwidth should be billed to the customer, generate an email invoice/statement combination and then insert the invoice information into frontaccounting as if I had manually inserted a direct invoice. This script would run just after midnight on the first of every month.
I wrote a first pass prototype of the script in bash (what an ugly kludge of a script!) It's 500 lines of database calls, and string manipulation. It was relatively easy to figure out what frontaccounting was doing by looking at the log, but I really would hate to do that again. If nothing else, the process was very informative of what frontaccounting was doing. (rather more complicated than some of the other accounting programs have been)
I wouldn't even bother posting the kludge. It's obviously not the way to go.
I've never really done much php scripting, but I guess now is as good a time as any. Can you run a php script from a cron job?