When building the "name + address" string, check if the

company name and contact name are the same and, if so,
	  only print one of them.  Fixes #109753.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8163 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2003-04-02 03:38:23 +00:00
parent 2e6325afe1
commit 875e3e49bc
2 changed files with 9 additions and 1 deletions

View File

@ -32,6 +32,11 @@
Fix the glade settings so resizing the window will properly
resize the widgets. Fixes #107586.
* src/business/business-core/business-core.scm:
When building the "name + address" string, check if the
company name and contact name are the same and, if so,
only print one of them. Fixes #109753.
2003-04-01 Christian Stimming <stimming@tuhh.de>
* src/report/report-system/options-utilities.scm: Fix missing i18n

View File

@ -21,10 +21,13 @@
((null? (cdr lst)) (car lst))
(else (string-append (build-string (cdr lst)) "\n" (car lst)))))
(define (unique str)
(if (and name str (string=? name str)) #f str))
(let ((lst '()))
(set! lst (add-if-exists lst name))
(set! lst (add-if-exists lst (gnc:address-get-name addr)))
(set! lst (add-if-exists lst (unique (gnc:address-get-name addr))))
(set! lst (add-if-exists lst (gnc:address-get-addr1 addr)))
(set! lst (add-if-exists lst (gnc:address-get-addr2 addr)))
(set! lst (add-if-exists lst (gnc:address-get-addr3 addr)))