Extra content added to printed invoices

Robert Heller heller at deepsoft.com
Sun Oct 7 10:08:42 EDT 2007


At Sun, 07 Oct 2007 09:30:45 -0400 Derek Atkins <warlord at MIT.EDU> wrote:

> 
> Robert Heller <heller at deepsoft.com> writes:
> 
> >> > Also: is there anything like an API document (for either 2.0 or 2.2)? 
> >> > Before I start messing with the code it would be nice to know what it
> >> > all means...
> >> 
> >> Sure!  http://cvs.gnucash.org/docs/HEAD/
> >
> > I could not find any useful *scheme* API docs here, or at least I am
> > not sure what to look for.  Specificly, what do the *all* arguments to
> > gnc:html-table-set-cell! mean (I can guess what *some* of them mean)? 
> > It appears to generate a <TD>..</TD> tag, but I am not sure what all of
> > the auguments mean. I am programming in the dark by (undocumented!)
> > example (cutting and pasting other code and generally guessing).
> 
> Ahh, sorry, there's no documentation for the scheme-only functions,
> except what exists as comments in the sources, or the sources itself.
> The only docs are for the C API, which in 2.2 is also the
> scheme-wrapped C API.
> 
> >> > Also: is there any special magic to get the system to recognise
> >> > additional new reports or is just dropping the file in the proper
> >> > directory suffiencent?
> >> 
> >> You need to get it loaded.  You can do that either in
> >> $HOME/.gnucash/config.user or by modifying the standard-reports.scm
> >> or business-reports.scm to load your report too.
> >
> > What *exactly* do I need to put in $HOME/.gnucash/config.user (or
> > $HOME/.gnucash/config.auto?)?  I included the line in
> > $HOME/.gnucash/config.auto: 
> >
> > (load-from-path "/home/heller/gnucash/stylesheet-dws.scm")
> >
> > Which I'm *guessing* will load the named scheme file, but I don't get any
> > errors nor any indication that this file is in fact being loaded.  I'm
> > hoping that this code will add an additional stylesheet template, but it
> > does not.  It is a copy of stylesheet-fancy.scm that I hacked (yes, I
> > changed the names).  I'll attach the file with this message.  I don't
> > want to hack on the files under /usr/share/gnucash -- I don't want to
> > randomly clobber my GnuCash installation, until I am sure my code works
> > properly. 
> 
> Did I say "gnucash.auto"?  Where did you get that from?
> You REALLY want to put this into gnucash.user, NOT gnucash.auto.
> But yes, that's the code you want.  And I've verified that it
> does work at least once before so I don't plan to do the test
> myself again.

There was a 'config.auto' already there and no config.user.

OK, I've put the "(load-from-path
"/home/heller/gnucash/stylesheet-dws.scm")" into config.user and now I'm
getting this error message:

sauron.deepsoft.com% gnucash                                            
       Backtrace:
In current input:
   1: 0* [gnc:report-menu-setup]
   ?: 1  (letrec (# # # ...) (gnc:add-extension income-expense-menu) ...)
In /usr/share/gnucash/guile-modules/gnucash/report/report-gnome.scm:
 112: 2* [gnc:add-extension #(menu "_Income & Expense" "" ...)]
In unknown file:
   ?: 3* gnc:extension-type

<unnamed port>: In expression gnc:extension-type:
<unnamed port>: Unbound variable: gnc:extension-type

What do I bind gnc:extension-type to?  It is NOT bound or referenced
anywhere in any of the existing stylesheet code (or in fact anywhere in
the scheme code (according to grep anyway).

I'm using 2.0.1 (on CentOS 4.5, installed from the RHEL 4 RPMs):
sauron.deepsoft.com% gnucash -v
GnuCash 2.0.1
Built 2006-08-23 from r14585
sauron.deepsoft.com% rpm -q gnucash
gnucash-2.0.1-4.rhel4



> 
> -derek
> 
> PS: What was the file you attached, and what were you expecting me
> to do with it?

It is the modified stylesheet scheme code.  I just wanted to verify
that the changes I made were all correct.


-- 
Robert Heller             -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software        -- Linux Installation and Administration
http://www.deepsoft.com/  -- Web Hosting, with CGI and Database
heller at deepsoft.com       -- Contract Programming: C/C++, Tcl/Tk
         


More information about the gnucash-user mailing list