[register] trim reg-renderer

there was dead code to handle printing invoices. remove.
This commit is contained in:
Christopher Lam 2019-01-04 12:02:09 +08:00
parent 102a357cfe
commit b96e48f23f

View File

@ -813,60 +813,26 @@
(gnc:option-value
(gnc:lookup-option (gnc:report-options report-obj) section name)))
(let ((document (gnc:make-html-document))
(splits '())
(table '())
(let* ((document (gnc:make-html-document))
(query-scm (opt-val "__reg" "query"))
(query #f)
(journal? (opt-val "__reg" "journal"))
(debit-string (opt-val "__reg" "debit-string"))
(credit-string (opt-val "__reg" "credit-string"))
(invoice? #f)
(title (opt-val "General" "Title")))
(if invoice?
(set! title (_ "Invoice")))
(set! query (gnc-scm2query query-scm))
(title (opt-val "General" "Title"))
(query (gnc-scm2query query-scm)))
(qof-query-set-book query (gnc-get-current-book))
(set! splits (if journal?
(let* ((splits (if journal?
(xaccQueryGetSplitsUniqueTrans query)
(qof-query-run query)))
(set! table (make-split-table splits
(table (make-split-table splits
(gnc:report-options report-obj)
debit-string credit-string
(if invoice? (_ "Charge") (_ "Amount"))))
(if invoice?
(begin
(gnc:html-document-add-object!
document
(gnc:make-html-text
(gnc:html-markup-br)
"User Name"
(gnc:html-markup-br)
(string-expand
"User Address"
#\newline
"<br>")
(gnc:html-markup-br)))
(gnc:html-table-set-style!
table "table"
'attribute (list "border" 1)
'attribute (list "cellspacing" 0)
'attribute (list "cellpadding" 4))
(gnc:html-document-add-object!
document
(make-info-table
""))))
(_ "Amount"))))
(gnc:html-document-set-title! document title)
(gnc:html-document-add-object! document table)
(qof-query-destroy query)
(qof-query-destroy query))
document))