Problems with custom invoice

Chris Dennis cgdennis at btinternet.com
Mon Nov 20 19:04:47 EST 2006


Derek Atkins wrote:
> Quoting Chris Dennis <cgdennis at btinternet.com>:
> 
>>>> Is there a way to access the client contact name on an invoice?  I can't
>>>> find one despite much Googling.
>>> Of course..  All the other invoices do it :)  Perhaps you're not
>>> pulling off the invoice's owner?
>> They don't seem to -- the standard 'fancy invoice' in GC2.0.2 doesn't
>> display the client contact name from the billing address.  It did in
>> 1.8.10.  For example, if the Edit Customer window looks like this:
> 
> I know nothing about the Fancy Invoice; that report was donated to
> the project.  The Printable Invoice, however, does it just fine, even
> in 2.0.x, so the code clearly works.  It's possible, however, that the
> Fancy Invoice does something differently than the Printable Invoice.
> I don't know.

This is getting messy.  When I try to reinstate the standard 
invoice.scm, gnucash crashes when reading in my accounts file:

----
   $ gnucash
   gnucash: [M] "Found Finance::Quote version ""1.11"
   Backtrace:
   In current input:
      1: 0* (let ((options #)) (let (#) (# option)) ...)
      1: 1* (let ((option #)) ((lambda # #) option))
      1: 2* [gnc:lookup-option #f "General" "Invoice Number"]
   In /usr/share/gnucash/scm/options.scm:
   1463: 3  ((options (quote lookup)) section name)
   1463: 4* (options (quote lookup))

   /usr/share/gnucash/scm/options.scm:1463:4: In expression (options 
(quote lookup)):
   /usr/share/gnucash/scm/options.scm:1463:4: Wrong type to apply: #f
----

So I can't check whether standard invoices are working for me.

There must be something invalid in my accounts file -- can you tell from 
that backtrace where I should start looking?  Gnucash 2.0 didn't 
complain when it converted the file from 1.8.

> 
>>     Identifcation
>>      Customer Number: 000123
>>      Company Name:    Bloggs and Co
>>     Billing Address
>>      Name:            Mr Fred Bloggs
>>      Address:         1 The Street
>> 	              The Town
>>                       etc.
>>
>> the invoice only shows this:
>>
>>     Bloggs and Co
>>     1 The Street
>>     The Town
>>
>> without 'Mr Fred Bloggs'.
> 
> Well, either the Invoice has no attached customer, or there's a bug.

I don't know what you mean by an 'attached customer'.  The invoice 
belongs to Bloggs and Co, which has Mr Fred Bloggs in the name field, 
but that name doesn't show on the printed invoice.
> 
>> But the other issue is the fonts used on the final printed invoice (or
>> on the print preview), which don't match those *displayed* by the Print
>> Report menu item.  The display uses the sans-serif fonts selected in my
>> Gnome configuration, but the invoice (all invoices, not just my
>> customised ones) prints with a serif font.
> 
> This is a known problem...  It's unclear if it's GnuCash or GtkHTML or
> some combination of the two.  I believe Andreas did some research and found
> a place where GnuCash does hard-code a report font, so it's possible that
> this is the problem.  Search the -devel archives for his message.  If you
> find a patch that fixes it please send it in.

I'll try...

cheers

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


More information about the gnucash-devel mailing list