Fix bug 592021: Budget Report: Options to show actual, budgeted, and difference columns

doesn't work correctly.

Patch by Luke Duncan


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18272 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Phil Longstaff 2009-08-22 21:10:42 +00:00
parent f4998e9186
commit a3804f6129

View File

@ -311,7 +311,7 @@
(style-tag (if total? "total-number-cell" "number-cell"))
(style-tag-neg (string-append style-tag "-neg"))
)
(if bgt-numeric-val
(if show-budget?
(begin
(set! bgt-val (if (gnc-numeric-zero-p bgt-numeric-val) "."
(gnc:make-gnc-monetary comm bgt-numeric-val)))
@ -320,7 +320,7 @@
(set! current-col (+ current-col 1))
)
)
(if act-numeric-val
(if show-actual?
(begin
(set! act-val (gnc:make-gnc-monetary comm act-numeric-val))
(gnc:html-table-set-cell/tag!
@ -330,7 +330,7 @@
(set! current-col (+ current-col 1))
)
)
(if dif-numeric-val
(if show-diff?
(begin
(set! dif-val
(if (and (gnc-numeric-zero-p bgt-numeric-val) (gnc-numeric-zero-p act-numeric-val))
@ -434,8 +434,14 @@
(period 0)
(current-col (+ colnum 1))
(col-list column-list)
(col-span 0)
)
(if show-budget? (set! col-span (+ col-span 1)))
(if show-actual? (set! col-span (+ col-span 1)))
(if show-diff? (set! col-span (+ col-span 1)))
(if (eqv? col-span 0) (set! col-span 1))
;; prepend 2 empty rows
(gnc:html-table-prepend-row! html-table '())
(gnc:html-table-prepend-row! html-table '())
@ -462,7 +468,7 @@
)
)
(set! tc (gnc:html-table-get-cell html-table 0 current-col))
(gnc:html-table-cell-set-colspan! tc (if show-diff? 3 2))
(gnc:html-table-cell-set-colspan! tc col-span)
(gnc:html-table-cell-set-tag! tc "centered-label-cell")
(set! current-col (+ current-col 1))
(set! col-list (cdr col-list))