gnucash master: [budget] reenable show-note option functionality

Christopher Lam clam at code.gnucash.org
Mon Oct 14 06:48:36 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/a7a8f633 (commit)
	from  https://github.com/Gnucash/gnucash/commit/e4bbf725 (commit)



commit a7a8f633bb941e20ced71c6f9b4579c9e7d4bc81
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon Oct 14 18:48:03 2019 +0800

    [budget] reenable show-note option functionality
    
    and fix comments

diff --git a/gnucash/report/reports/standard/budget.scm b/gnucash/report/reports/standard/budget.scm
index 0f3ac7602..4ff3beeef 100644
--- a/gnucash/report/reports/standard/budget.scm
+++ b/gnucash/report/reports/standard/budget.scm
@@ -267,8 +267,9 @@
   (apply gnc:html-markup "ol" (map (lambda (elt) (gnc:html-markup "li" elt)) lst)))
 
 ;; creates a footnotes collector. (make-footnote-collector) => coll
-;; (coll elt) adds elt to store, returns html-text containing ref eg. [1]
-;; (coll 'list) returns html-text containing <ul> of all elts
+;; (coll elt) if elt is not null or "", adds elt to store, returns
+;; html-text containing ref eg. <sup title='note'>1</sup>. calling
+;; (coll 'list) returns html-text containing <ol> of all stored elts
 (define (make-footnote-collector)
   (let ((notes '()) (num 0))
     (match-lambda
@@ -282,7 +283,7 @@
        (set! notes (cons (gnc:html-string-sanitize note) notes))
        (set! num (1+ num))
        (let ((text (gnc:make-html-text
-                    (gnc:html-markup "sup" " " (number->string num)))))
+                    " " (gnc:html-markup "sup" (number->string num)))))
          (gnc:html-text-set-style! text "sup" 'attribute `("title" ,note))
          text)))))
 
@@ -393,7 +394,7 @@
                  html-table rownum col0 style-tag
                  (if (zero? bgt-val) "."
                      (gnc:make-gnc-monetary comm bgt-val))
-                 (footnotes note)))
+                 (if show-note? (footnotes note) "")))
             (if show-actual?
                 (gnc:html-table-set-cell/tag!
                  html-table rownum col1



Summary of changes:
 gnucash/report/reports/standard/budget.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list