Modify Invoice Templates

Chris Dennis cgdennis at btinternet.com
Wed Jul 22 05:21:21 EDT 2009


Phil Longstaff wrote:
> On July 21, 2009 04:35:17 pm Paul Kruger wrote:
>> NOTE TO DEVELOPERS...the program is great EXCEPT for poor invoice
>> capabilities which makes in not-usable for most businesses.  There is no
>> way I can see any accountant trying to struggle with designing and printing
>> invoices with Gnucash unless he is also a graduate computer programmer.
>> Daisy the secretary will be totally lost.
>>
>>
>> This seems to have been an on going flaw in Gnucash re Printing and
>> Invoices.  I can't imagine any business user being able to use Gnucash
>> given the current lack of development in this area.  Printing an invoice is
>> a primary and most important function for any accounting program used in
>> business.
>>
>>
>> A personal home account user may never need to print an invoice. If that is
>> the only audience, this is ok.
>>
>>
>> I am trying to get rid of Windows and Quickbooks but absent any means to
>> set up a standard default invoice and print it, Gnucash falls far short on
>> that one account. It is a fatal flaw !
>>
>>
>> Everything else is in place and I like the program but it remains a no-go
>> until I can lay out my invoice and print it.
>>
>>
>> Suggestion:
>>
>>
>> Use standard HTML and CSS files for templates then place the code to print
>> the data where needed.  That way almost anyone can edit templates or offer
>> various template designs for download for non-html people. You are already
>> set to output as html so why not use the same HTML as a template?
>>
>> :teeth:
> 
> The advantage of gnucash being open-source is that anyone has the right to 
> take it and modify it to suit their needs.  The person who wrote the business 
> section of gnucash did that.  He designed the invoice to fit his needs and 
> provided anyone else the right to take that code and modify it.
> 
> The disadvantage of gnucash being open-source is that there is no marketing or 
> customer service organization which takes customer needs and feeds them to a 
> software team to develop the software.  The versions that are released are 
> produced by volunteers who modify the software to scratch their particular 
> itches.  For me, a gnucash developer, I have scratched my particular itches, 
> and if that helps other people scratch theirs, great.  I personally don't care 
> about invoices, but if someone else wants to fix invoices, they are more than 
> welcome to pitch in.
> 
> Re your suggestion: someone has done what you suggest.  2.3.3 (maybe 2.3.2 as 
> well, I can't remember), an unstable version that will be released tomorrow or 
> Thursday, contains 1) webkit replacement for gtkhtml as the report display 
> engine 2) work by Chris Dennis to define an html/css template for an invoice 
> that includes embedded SCM code to insert the data.  Since I'm the 2.3.X/2.4 
> release engineer, I've worked with him a bit to get it included in the release 
> so that people can try it.  However, it's not my area of interest.  If you 
> want to download it (I'm not sure if/how it can run in parallel with a current 
> 2.2.X installation on windows) and test it out and provide feedback, I'm sure 
> Chris would be delighted.

There are instructions on using the new report templating system on the 
wiki at 
http://wiki.gnucash.org/wiki/index.php?title=Custom_Reports_Using_Eguile

Making simple changes to templates can be as easy as changing HTML or 
CSS/  But the templates also involve Guile (a dialect of Scheme) code 
which handles the loops and conditions and accesses values from GnuCash, 
so making bigger changes, or creating new reports, is still non-trivial.

I've tested the new system on 2.2.6 and 2.2.9 -- it's just a question 
copying a few files to the right places, and editing the 
.gnucash/config.user file.

The results on 2.2.x versions are good, but not as good as with the 
CSS-capable Webkit system that is part of 2.3.2 and later versions.

So far I've created two new template-based reports -- an invoice and a 
balance sheet.  Hopefully people will start adding more -- I'll be happy 
to help if they do.

cheers

Chris
-- 
Chris Dennis                                  cgdennis at btinternet.com
Fordingbridge, Hampshire, UK


More information about the gnucash-devel mailing list