API questions
Art
pinaart at yahoo.com
Fri Jun 10 15:42:19 EDT 2016
If I were writing a program to do things, I'd be looking at the source code, though it would be nice if the API stood alone. (I haven't used the API, so I am not familiar with what you're trying to do specifically. I usually just tweak GC and rebuild it to make it do what I want or access the SQL database directly, carefully if I am writing to it.)
On exporting to PDF, I always use a PDF printer driver (in Windows and Linux). I've seen some apps that do export to PDF, but I never do that with my code - it's not worth bloating it (my software apps do create ASCII text files and write to the clipboard). I can also see where you may want to export v. print programmatically (avoid modal printer dialogs, if you need to change the default printer).
From: David Goodenough <david.goodenough at linkchoose.co.uk>
To: gnucash-user at gnucash.org
Sent: Friday, June 10, 2016 2:05 AM
Subject: API questions
I notice when looking at the API pages that a method is defined as starting
at a given line, and then the code below always starts on the next line, i.e.
missing out the prototype. For example:-
Definition at line 116 of file print-session.c.
117 {
118 return print_settings;
119 }
Would it not be possible to show line 116 as well? This seems to be a
consistent problem throughout the docs.
The reason I was looking was to generate customer reports via the API.
I would like to be able to generate a report for each customer who either
has a non-zero balance or where some transaction (invoice or receipt of
payment) happened last month (or since rather since I last ran the program).
I then want to export the report as a PDF. I have looked my way through
the API docs but could not see how to generate reports, or to check for
the balance or the presence of transactions since a date.
I found docs on how to create invoices, but also need to be able to
export them as PDFs and could not locate the API for that either. I notice
in the gnucash XML files that the last direcorty to which invoices ( and I
guess customer reports ) were exported is stored, is this available from
the API.
What I want to be able to write is a program that will generate reports
for all relevant customers, and then send an email to each customer who
has either an invoice and/or a report containing both.
Any pointers gratefully received.
David
_______________________________________________
gnucash-user mailing list
gnucash-user at gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
More information about the gnucash-user
mailing list