Invoice: Remove H1 title and superflous option.

Release Note: Printing the title twice is silly, so remove the option
and the H1 display of the title. Note that the remaining title is in
a div named "invoice-title" so it can be styled with CSS as the user
pleases from the Report Options Layout tab.
This commit is contained in:
Christopher Lam 2018-11-06 07:45:35 +08:00 committed by John Ralls
parent 53680e6100
commit 01a0bc2bb2

View File

@ -266,11 +266,6 @@ for styling the invoice. Please see the exported report for the CSS class names.
(gnc:register-inv-option (gnc:make-internal-option "Display" "My Company" #f)) (gnc:register-inv-option (gnc:make-internal-option "Display" "My Company" #f))
(gnc:register-inv-option (gnc:make-internal-option "Display" "My Company ID" #f)) (gnc:register-inv-option (gnc:make-internal-option "Display" "My Company ID" #f))
(gnc:register-inv-option
(gnc:make-simple-boolean-option
(N_ "Display") (N_ "Title")
"a" (N_ "Display invoice title and invoice ID?") #t))
(gnc:register-inv-option (gnc:register-inv-option
(gnc:make-simple-boolean-option (gnc:make-simple-boolean-option
(N_ "Display") (N_ "Due Date") (N_ "Display") (N_ "Due Date")
@ -826,17 +821,14 @@ for styling the invoice. Please see the exported report for the CSS class names.
(qof-print-date (current-time)))))) (qof-print-date (current-time))))))
(layout-lookup (lambda (loc) (cdr (assq (opt-val "Layout" loc) layout-lookup-table))))) (layout-lookup (lambda (loc) (cdr (assq (opt-val "Layout" loc) layout-lookup-table)))))
(gnc:html-document-set-title! document invoice-title)
(gnc:html-document-set-style-text! document (opt-val "Layout" "CSS")) (gnc:html-document-set-style-text! document (opt-val "Layout" "CSS"))
(let ((main-table (gnc:make-html-table))) (let ((main-table (gnc:make-html-table)))
(if (opt-val "Display" "Title") (gnc:html-table-append-row! main-table
(gnc:html-table-append-row! main-table (gnc:make-html-table-cell/size
(gnc:make-html-table-cell/size 1 2 (gnc:make-html-div/markup
1 2 (gnc:make-html-div/markup "invoice-title" invoice-title)))
"invoice-title" invoice-title))))
(gnc:html-table-append-row! main-table (gnc:html-table-append-row! main-table
(list (layout-lookup "Row 1 Left") (list (layout-lookup "Row 1 Left")