Editing invoice scm files

Andrew Sackville-West andrew at swclan.homelinux.org
Tue Jul 22 10:31:12 EDT 2008


On Mon, Jul 21, 2008 at 08:59:17PM +1000, Shane Litherland wrote:
> Hello All;
> 
> I'm somewhat a novice to the syntax/code behind the scenes in gnucash,
> though i can be a fast learner! Been reading up online (forums, wiki,
> FAQ's etc) but no leads for my particular query.
> 
> Trying to remove today's date from the printed invoice/report - that
> shows top right, underneath business contact details. i'm happy to just
> have 'invoice date' and 'due date' in top left of report.

> 
> tried editing both easy-invoice.scm (the report format i use) and
> invoice.scm . Found for previous edits (e.g. changing 'tax' subtotal
> label to 'GST' - thanks to advice online for that one!) that despite
> using easy-invoice, the change didn't happen until i edited the
> invoice.scm file. figure the easy-invoice.scm must just get a lot of its
> info from the invoice.scm file, and just lay it out different?
> Anyway, tried 'commenting' various sections (semicolon ; ) to 'remove'
> them from the commands, to figure out what did what. had lots of
> attempts, mostly nothing happened, then occasionally i'd just get an
> error message back and no report at all! so obviously, not getting the
> correct approach. also though of 'null field' (putting "" somewhere) but
> again, not sure where to start.
> 
> any quick answers?


I *think* you will find that in the function make-myname-table. At the
very bottom of that function you will see a reference to localtime. If
you comment out that code block:

    (gnc:html-table-append-row! table (list
                                       (strftime
                                        date-format
                                        (localtime (car
                                       (gnc:get-today))))))

that should wipe the date from the invoice. I haven't tested this, but
it should work.

Of course, ideally, there would be an option to control that, if it's
something other people might use.


> or, if the best way to explain it is to start me on
> learning what the code means, any suggested places to start (online, or
> "... for dummies" ?)

scheme is a really easy language to learn, once you apply
yourself. try googling "scheme fixnum days" to get started and SICP to
really get into it. There are many scheme tutorials out there. The
biggest part of report writing is learning the gnucash api...

> if i figure this much out, might also try removing some of the columns i
> don't want..

aren't many of the columns already controlled by the options? 

A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.gnucash.org/pipermail/gnucash-user/attachments/20080722/d9dc83c3/attachment.bin 


More information about the gnucash-user mailing list