Duplicate customer name on tax invoice

David Muir davidkmuir at gmail.com
Tue Mar 22 22:06:34 EDT 2011


On 23/03/11 01:16, Mike Evans wrote:
> I think I may be resposible for this. :) In order to fix a bug in the std. 
> invoice where the name wasn't displayed at all I 'fixed' busines-core.scm and 
> invoice.scm.  Unfortunately this makes the tax invoice display the recipient 
> name twice.  Fixing it for the tax invoice breaks it again for invoice.scm.
> If you want fix your install comment line 58 (with a semi-colon) in busines-
> core.scm.  Restart GnuCash afer editing.
>
> It will have to be re-fixed for ordinary invoices. 
>  

I had a further play with it, and was able to modify the eguile part
instead, so it should keep working after an update.

For anyone who's interested, I added the following lines to a copy of
taxinvoice.eguile.scm:

|(ownercomp  (gnc:owner-get-name-dep owner))
(owneraddr1 (gncAddressGetAddr1 (gnc:owner-get-address owner)))
(owneraddr2 (gncAddressGetAddr2 (gnc:owner-get-address owner)))
(owneraddr3 (gncAddressGetAddr3 (gnc:owner-get-address owner)))
(owneraddr4 (gncAddressGetAddr4 (gnc:owner-get-address owner)))|

And then in the html:
|<!-- customer info -->
  <td align="left" class="customer">
    <?scm (if (not (string=? billcontact "")) (begin ?>
      <span class="contact-name">Attn: <?scm:d billcontact ?></span><br />
    <?scm )) ?>
    <?scm (if (not (string=? ownercomp "")) (begin ?>
      <span class="company-name"><?scm:d ownercomp ?></span><br />
    <?scm )) ?>
    <?scm (if (not (string=? owneraddr1 "")) (begin ?>
      <span class="company-addr1"><?scm:d owneraddr1 ?></span><br />
    <?scm )) ?>
    <?scm (if (not (string=? owneraddr2 "")) (begin ?>
      <span class="company-addr2"><?scm:d owneraddr2 ?></span><br />
    <?scm )) ?>
    <?scm (if (not (string=? owneraddr3 "")) (begin ?>
      <span class="company-addr3"><?scm:d owneraddr3 ?></span><br />
    <?scm )) ?>
    <?scm (if (not (string=? owneraddr4 "")) (begin ?>
      <span class="company-addr4"><?scm:d owneraddr4 ?></span><br />
    <?scm )) ?>
  </td>|

It's probably a bit more verbose than it needs to be, but works :-)

Cheers,
David


More information about the gnucash-user mailing list