API questions
John Ralls
jralls at ceridwen.us
Fri Jun 10 11:29:01 EDT 2016
> On Jun 10, 2016, at 7:06 AM, David Goodenough <david.goodenough at linkchoose.co.uk> wrote:
>
> On Friday 10 June 2016 06:59:38 John Ralls wrote:
>>> On Jun 10, 2016, at 2:05 AM, David Goodenough
>>> <david.goodenough at linkchoose.co.uk> wrote:
>>>
>>> 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 prototype is in very large print above the description. Repeating it in
>> the listing would be redundant.
> OK, missed that. It just looked odd at first glance that the line number
> immedately before the code was not in the code that was shown.
>>> 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.
> I think having read a bit further that this is in the customer dictionary?
>>>
>>> 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.
>>
>> PDF generation is provided by (IIRC) libgtk as part of printing support. You
>> won't find the code for that in GnuCash itself.
> OK, but I still need to tell it to generate the customer report, and to check
> whether I need to do so?
Sorry, neither of those questions make sense.
Regards,
John Ralls
More information about the gnucash-user
mailing list