mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[register] trim reg-renderer
there was dead code to handle printing invoices. remove.
This commit is contained in:
parent
102a357cfe
commit
b96e48f23f
@ -813,60 +813,26 @@
|
|||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
(gnc:lookup-option (gnc:report-options report-obj) section name)))
|
(gnc:lookup-option (gnc:report-options report-obj) section name)))
|
||||||
|
|
||||||
(let ((document (gnc:make-html-document))
|
(let* ((document (gnc:make-html-document))
|
||||||
(splits '())
|
(query-scm (opt-val "__reg" "query"))
|
||||||
(table '())
|
(journal? (opt-val "__reg" "journal"))
|
||||||
(query-scm (opt-val "__reg" "query"))
|
(debit-string (opt-val "__reg" "debit-string"))
|
||||||
(query #f)
|
(credit-string (opt-val "__reg" "credit-string"))
|
||||||
(journal? (opt-val "__reg" "journal"))
|
(title (opt-val "General" "Title"))
|
||||||
(debit-string (opt-val "__reg" "debit-string"))
|
(query (gnc-scm2query query-scm)))
|
||||||
(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))
|
|
||||||
|
|
||||||
(qof-query-set-book query (gnc-get-current-book))
|
(qof-query-set-book query (gnc-get-current-book))
|
||||||
|
|
||||||
(set! splits (if journal?
|
(let* ((splits (if journal?
|
||||||
(xaccQueryGetSplitsUniqueTrans query)
|
(xaccQueryGetSplitsUniqueTrans query)
|
||||||
(qof-query-run query)))
|
(qof-query-run query)))
|
||||||
|
(table (make-split-table splits
|
||||||
(set! table (make-split-table splits
|
(gnc:report-options report-obj)
|
||||||
(gnc:report-options report-obj)
|
debit-string credit-string
|
||||||
debit-string credit-string
|
(_ "Amount"))))
|
||||||
(if invoice? (_ "Charge") (_ "Amount"))))
|
(gnc:html-document-set-title! document title)
|
||||||
|
(gnc:html-document-add-object! document table)
|
||||||
(if invoice?
|
(qof-query-destroy query))
|
||||||
(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
|
|
||||||
""))))
|
|
||||||
|
|
||||||
(gnc:html-document-set-title! document title)
|
|
||||||
(gnc:html-document-add-object! document table)
|
|
||||||
|
|
||||||
(qof-query-destroy query)
|
|
||||||
|
|
||||||
document))
|
document))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user