Problems with custom invoice

Brian dol-sen at telus.net
Tue Nov 21 00:32:36 EST 2006


On Mon, 2006-20-11 at 17:54 -0500, Derek Atkins wrote:
> Quoting Chris Dennis <cgdennis at btinternet.com>:
> 
> > OK, I'll continue this in -devel.
> >
> > You should use
> >> (gnc:owner-get-name-and-address-dep owner) as the API to
> >> obtain the owner's name and address.
> >
> > I am using that -- I didn't make that clear.
> 
> Okay...
> 
> >>> 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;

Not quite :) You did improve a few mods I did for the 2.x series.  But I
did not change that (I checked my diff file I submitted).

>  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.
> 

Yes the 2 code blocks are slightly different.  But my installed version
is 2.0.1 and the printable & easy invoices do not show the 
"Billing Address Name" either.  Only the Customer Name & Billing
Address.


> >     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.
> 

It's a bug :(


> >
> > Chris
> 
> -derek
> 

The fancy invoice snipit:

    (gnc:html-table-cell-append-objects!
     name-cell (gnc:owner-get-name-dep owner))
    (gnc:html-table-cell-set-style!
     name-cell "td"
     'font-size "+2")
    (gnc:html-table-append-row! table (list name-cell #\newline "<br>"))
    (gnc:html-table-append-row!
     table
     (list
      (string-expand (gnc:owner-get-address-dep owner) #\newline "<br>")))
    (gnc:html-table-append-row!
     table
     (list "<br>"))


The invoice.scm snipit:

    (gnc:html-table-append-row!
     table
     (list
      (string-expand (gnc:owner-get-name-and-address-dep owner) #\newline "<br>")))
    (gnc:html-table-append-row!
     table
     (list "<br>"))


-- 
Brian <dol-sen at telus.net>



More information about the gnucash-devel mailing list