mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Use the Book-KVP-Options for the Company Name and Company Address in
the PrintInvoice, Customer, and Vendor reports. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7100 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
066484edb3
commit
4b71c08cb8
@ -516,8 +516,16 @@
|
||||
'attribute (list "valign" "top"))
|
||||
table))
|
||||
|
||||
(define (make-myname-table date-format)
|
||||
(let ((table (gnc:make-html-table)))
|
||||
(define (make-myname-table book date-format)
|
||||
(let* ((table (gnc:make-html-table))
|
||||
(slots (gnc:book-get-slots book))
|
||||
(name (gnc:kvp-frame-get-slot-path
|
||||
slots (append gnc:*kvp-option-path*
|
||||
(list gnc:*business-label* gnc:*company-name*))))
|
||||
(addy (gnc:kvp-frame-get-slot-path
|
||||
slots (append gnc:*kvp-option-path*
|
||||
(list gnc:*business-label* gnc:*company-addy*)))))
|
||||
|
||||
(gnc:html-table-set-style!
|
||||
table "table"
|
||||
'attribute (list "border" 0)
|
||||
@ -525,21 +533,12 @@
|
||||
'attribute (list "valign" "top")
|
||||
'attribute (list "cellspacing" 0)
|
||||
'attribute (list "cellpadding" 0))
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list
|
||||
(gnc:option-value
|
||||
(gnc:lookup-global-option "User Info" "User Name"))))
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list
|
||||
(string-expand
|
||||
(gnc:option-value
|
||||
(gnc:lookup-global-option "User Info" "User Address"))
|
||||
(gnc:html-table-append-row! table (list (if name name "")))
|
||||
(gnc:html-table-append-row! table (list (string-expand
|
||||
(if addy addy "")
|
||||
#\newline "<br>")))
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list (date->string (current-date) date-format)))
|
||||
(gnc:html-table-append-row! table (list (date->string (current-date)
|
||||
date-format)))
|
||||
table))
|
||||
|
||||
(define (make-break! document)
|
||||
@ -574,7 +573,7 @@
|
||||
(gnc:html-document-set-title! document title)
|
||||
|
||||
(if invoice
|
||||
(begin
|
||||
(let ((book (gnc:invoice-get-book invoice)))
|
||||
(set! table (make-entry-table invoice
|
||||
(gnc:report-options report-obj)
|
||||
add-order))
|
||||
@ -587,7 +586,7 @@
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(make-myname-table (opt-val "Display" "Today Date Format")))
|
||||
(make-myname-table book (opt-val "Display" "Today Date Format")))
|
||||
|
||||
(let ((date-table #f)
|
||||
(post-date (gnc:invoice-get-date-posted invoice))
|
||||
|
@ -388,8 +388,16 @@
|
||||
'attribute (list "valign" "top"))
|
||||
table))
|
||||
|
||||
(define (make-myname-table date-format)
|
||||
(let ((table (gnc:make-html-table)))
|
||||
(define (make-myname-table book date-format)
|
||||
(let* ((table (gnc:make-html-table))
|
||||
(slots (gnc:book-get-slots book))
|
||||
(name (gnc:kvp-frame-get-slot-path
|
||||
slots (append gnc:*kvp-option-path*
|
||||
(list gnc:*business-label* gnc:*company-name*))))
|
||||
(addy (gnc:kvp-frame-get-slot-path
|
||||
slots (append gnc:*kvp-option-path*
|
||||
(list gnc:*business-label* gnc:*company-addy*)))))
|
||||
|
||||
(gnc:html-table-set-style!
|
||||
table "table"
|
||||
'attribute (list "border" 0)
|
||||
@ -397,21 +405,14 @@
|
||||
'attribute (list "valign" "top")
|
||||
'attribute (list "cellspacing" 0)
|
||||
'attribute (list "cellpadding" 0))
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list
|
||||
(gnc:option-value
|
||||
(gnc:lookup-global-option "User Info" "User Name"))))
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list
|
||||
(string-expand
|
||||
(gnc:option-value
|
||||
(gnc:lookup-global-option "User Info" "User Address"))
|
||||
|
||||
(gnc:html-table-append-row! table (list (if name name "")))
|
||||
(gnc:html-table-append-row! table (list (string-expand
|
||||
(if addy addy "")
|
||||
#\newline "<br>")))
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list (date->string (current-date) date-format)))
|
||||
(gnc:html-table-append-row! table
|
||||
(list (date->string (current-date)
|
||||
date-format)))
|
||||
table))
|
||||
|
||||
(define (make-break! document)
|
||||
@ -435,7 +436,8 @@
|
||||
(report-date (gnc:timepair-end-day-time
|
||||
(gnc:date-option-absolute-time
|
||||
(opt-val gnc:pagename-general (N_ "To")))))
|
||||
(title #f))
|
||||
(title #f)
|
||||
(book (gnc:get-current-book))) ;XXX Grab this from elsewhere
|
||||
|
||||
(if (not (null? account-list))
|
||||
(set! account (car account-list)))
|
||||
@ -479,7 +481,7 @@
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(make-myname-table (opt-val gnc:pagename-general (N_ "Today Date Format"))))
|
||||
(make-myname-table book (opt-val gnc:pagename-general (N_ "Today Date Format"))))
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
|
Loading…
Reference in New Issue
Block a user