diff --git a/src/report/report-system/html-acct-table.scm b/src/report/report-system/html-acct-table.scm index cd6a00d202..bfe765f940 100644 --- a/src/report/report-system/html-acct-table.scm +++ b/src/report/report-system/html-acct-table.scm @@ -1291,7 +1291,7 @@ label indented-depth account-colspan ;; label-colspan - #f ;; label-markup + "anchor-cell" ;; label-markup amount (+ account-cols (- 0 1) (- logical-cols display-depth) diff --git a/src/report/standard-reports/budget.scm b/src/report/standard-reports/budget.scm index ae720cb37e..6bbcb4e269 100644 --- a/src/report/standard-reports/budget.scm +++ b/src/report/standard-reports/budget.scm @@ -208,6 +208,10 @@ (define (negative-numeric-p x) (if (gnc-numeric-p x) (gnc-numeric-negative-p x) #f)) + (define (number-cell-tag x) + (if (negative-numeric-p x) "number-cell-neg" "number-cell")) + (define (total-number-cell-tag x) + (if (negative-numeric-p x) "total-number-cell-neg" "total-number-cell")) ;; Adds a line to tbe budget report. ;; @@ -276,14 +280,14 @@ (if show-actual? (begin (gnc:html-table-set-cell/tag! - html-table rownum current-col (if (negative-numeric-p act-numeric-val) "number-cell-neg" "number-cell") act-val) + html-table rownum current-col (number-cell-tag act-numeric-val) act-val) (set! current-col (+ current-col 1)) ) ) (if show-diff? (begin (gnc:html-table-set-cell/tag! - html-table rownum current-col (if (negative-numeric-p dif-numeric-val) "number-cell-neg" "number-cell") dif-val) + html-table rownum current-col (number-cell-tag dif-numeric-val) dif-val) (set! current-col (+ current-col 1)) ) ) @@ -306,20 +310,19 @@ (if show-actual? (begin (gnc:html-table-set-cell/tag! - html-table rownum current-col (if (negative-numeric-p act-total) "total-number-cell" "total-number-cell-neg") + html-table rownum current-col (total-number-cell-tag act-total) (gnc:make-gnc-monetary comm act-total)) (set! current-col (+ current-col 1)) ) ) (if show-diff? (let* ((diff-val - (gnc:make-gnc-monetary comm (gnc-numeric-sub bgt-total act-total GNC-DENOM-AUTO - (+ GNC-DENOM-LCD GNC-RND-NEVER))))) + (+ GNC-DENOM-LCD GNC-RND-NEVER)))) (gnc:html-table-set-cell/tag! - html-table rownum current-col (if (negative-numeric-p diff-val) "total-number-cell-neg" "total-number-cell") - (if bgt-total-unset? "." diff-val) + html-table rownum current-col (total-number-cell-tag diff-val) + (if bgt-total-unset? "." (gnc:make-gnc-monetary comm diff-val)) ) (set! current-col (+ current-col 1)) ) @@ -353,6 +356,16 @@ (set! period (+ period 1)) ) ) + (if show-totalcol? + (let* ( + (tc #f)) + (gnc:html-table-set-cell/tag! + html-table 0 (+ current-col num-periods) "centered-label-cell" + "Total") + (set! tc (gnc:html-table-get-cell html-table 0 (+ current-col num-periods))) + (gnc:html-table-cell-set-colspan! tc (if show-diff? 3 2)) + ) + ) ;; make the column headers (set! period 0) @@ -385,9 +398,6 @@ ) (if show-totalcol? (begin - (gnc:html-table-set-cell/tag! - html-table 0 (if show-diff? (+ current-col 1) current-col) "centered-label-cell" - "Total") (if show-budget? (begin (gnc:html-table-set-cell/tag! diff --git a/src/report/stylesheets/stylesheet-css.scm b/src/report/stylesheets/stylesheet-css.scm index 2a371e6ca5..bc49d393f6 100644 --- a/src/report/stylesheets/stylesheet-css.scm +++ b/src/report/stylesheets/stylesheet-css.scm @@ -201,15 +201,23 @@ 'attribute (list "cellspacing" spacing) 'attribute (list "cellpadding" padding)) + (gnc:html-document-set-style! + ssdoc "anchor-cell" + 'tag "td" + 'attribute (list "class" "anchor-cell") + 'attribute (list "nowrap")) + (gnc:html-document-set-style! ssdoc "number-cell" 'tag "td" - 'attribute (list "class" "number-cell")) + 'attribute (list "class" "number-cell") + 'attribute (list "nowrap")) (gnc:html-document-set-style! ssdoc "number-cell-neg" 'tag "td" - 'attribute (list "class" "number-cell-neg")) + 'attribute (list "class" "number-cell-neg") + 'attribute (list "nowrap")) (gnc:html-document-set-style! ssdoc "number-header" @@ -224,12 +232,14 @@ (gnc:html-document-set-style! ssdoc "total-number-cell" 'tag "td" - 'attribute (list "class" "total-number-cell")) + 'attribute (list "class" "total-number-cell") + 'attribute (list "nowrap")) (gnc:html-document-set-style! ssdoc "total-number-cell-neg" 'tag "td" - 'attribute (list "class" "total-number-cell-neg")) + 'attribute (list "class" "total-number-cell-neg") + 'attribute (list "nowrap")) (gnc:html-document-set-style! ssdoc "total-label-cell" diff --git a/src/report/stylesheets/stylesheet-easy.scm b/src/report/stylesheets/stylesheet-easy.scm index 8aef33ca07..74cdd5d953 100644 --- a/src/report/stylesheets/stylesheet-easy.scm +++ b/src/report/stylesheets/stylesheet-easy.scm @@ -231,6 +231,12 @@ ;;;; ;;;; + (gnc:html-document-set-style! + ssdoc "anchor-cell" + 'tag "td" + 'attribute (list "align" "left") + 'attribute (list "nowrap")) + (gnc:html-document-set-style! ssdoc "number-cell" 'tag "td" diff --git a/src/report/stylesheets/stylesheet-fancy.scm b/src/report/stylesheets/stylesheet-fancy.scm index 90c74c216a..7540aba506 100644 --- a/src/report/stylesheets/stylesheet-fancy.scm +++ b/src/report/stylesheets/stylesheet-fancy.scm @@ -225,6 +225,12 @@ ;;;; ;;;; ;;;; + (gnc:html-document-set-style! + ssdoc "anchor-cell" + 'tag "td" + 'attribute (list "align" "left") + 'attribute (list "nowrap")) + (gnc:html-document-set-style! ssdoc "number-cell" 'tag "td" diff --git a/src/report/stylesheets/stylesheet-plain.scm b/src/report/stylesheets/stylesheet-plain.scm index df114254fe..3427e3cb1f 100644 --- a/src/report/stylesheets/stylesheet-plain.scm +++ b/src/report/stylesheets/stylesheet-plain.scm @@ -102,6 +102,12 @@ 'attribute (list "cellspacing" spacing) 'attribute (list "cellpadding" padding)) + (gnc:html-document-set-style! + ssdoc "anchor-cell" + 'tag "td" + 'attribute (list "align" "left") + 'attribute (list "nowrap")) + (gnc:html-document-set-style! ssdoc "number-cell" 'tag "td"