Problems with custom invoice
Chris Dennis
cgdennis at btinternet.com
Tue Nov 21 03:07:31 EST 2006
Brian wrote:
> 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 :(
Thank you -- I thought I was going mad.
>
>
>>> 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>"))
>
I've tried all of gnc:owner-get-address, gnc:owner-get-name-dep,
gnc:owner-get-address-dep, and gnc:owner-get-name-and-address-dep, and
none of them include billing address name (which is referred to as the
contact name in some places).
The relevant code in guile-modules/gnucash/business-core.scm hasn't
changed since 1.8.10, so I'm at a loss.
cheers
Chris
--
Chris Dennis cgdennis at btinternet.com
Fordingbridge, Hampshire, UK
More information about the gnucash-devel
mailing list