Skip to content

Commit

Permalink
[investment-lots] more succinctly add chart and table
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Dec 24, 2022
1 parent 1f2b588 commit 6907d77
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions gnucash/report/reports/standard/investment-lots.scm
Expand Up @@ -2011,22 +2011,15 @@

(all-accounts-info 'add-to-table table #t)))

;; Add table to top of doc (if chart goes on bottom).
(if (eq? chart-location 'bottom)
(gnc:html-document-add-object! document table))

;; Maybe add chart to doc.
(cond
(show-chart
(if (eq? chart-location 'bottom)
(add-padding-rows 3))
(when (and show-chart (eq? chart-location 'top))
(gnc:html-document-add-object! document chart)
(if (eq? chart-location 'top)
(add-padding-rows 3))))
(add-padding-rows 3))

(gnc:html-document-add-object! document table)

;; Add table to bottom of doc (if chart goes on top).
(if (eq? chart-location 'top)
(gnc:html-document-add-object! document table))
(when (and show-chart (eq? chart-location 'bottom))
(add-padding-rows 3)
(gnc:html-document-add-object! document chart))

document))

Expand Down

0 comments on commit 6907d77

Please sign in to comment.