mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
f4998e9186
commit
a3804f6129
@ -311,7 +311,7 @@
|
|||||||
(style-tag (if total? "total-number-cell" "number-cell"))
|
(style-tag (if total? "total-number-cell" "number-cell"))
|
||||||
(style-tag-neg (string-append style-tag "-neg"))
|
(style-tag-neg (string-append style-tag "-neg"))
|
||||||
)
|
)
|
||||||
(if bgt-numeric-val
|
(if show-budget?
|
||||||
(begin
|
(begin
|
||||||
(set! bgt-val (if (gnc-numeric-zero-p bgt-numeric-val) "."
|
(set! bgt-val (if (gnc-numeric-zero-p bgt-numeric-val) "."
|
||||||
(gnc:make-gnc-monetary comm bgt-numeric-val)))
|
(gnc:make-gnc-monetary comm bgt-numeric-val)))
|
||||||
@ -320,7 +320,7 @@
|
|||||||
(set! current-col (+ current-col 1))
|
(set! current-col (+ current-col 1))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if act-numeric-val
|
(if show-actual?
|
||||||
(begin
|
(begin
|
||||||
(set! act-val (gnc:make-gnc-monetary comm act-numeric-val))
|
(set! act-val (gnc:make-gnc-monetary comm act-numeric-val))
|
||||||
(gnc:html-table-set-cell/tag!
|
(gnc:html-table-set-cell/tag!
|
||||||
@ -330,7 +330,7 @@
|
|||||||
(set! current-col (+ current-col 1))
|
(set! current-col (+ current-col 1))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if dif-numeric-val
|
(if show-diff?
|
||||||
(begin
|
(begin
|
||||||
(set! dif-val
|
(set! dif-val
|
||||||
(if (and (gnc-numeric-zero-p bgt-numeric-val) (gnc-numeric-zero-p act-numeric-val))
|
(if (and (gnc-numeric-zero-p bgt-numeric-val) (gnc-numeric-zero-p act-numeric-val))
|
||||||
@ -434,8 +434,14 @@
|
|||||||
(period 0)
|
(period 0)
|
||||||
(current-col (+ colnum 1))
|
(current-col (+ colnum 1))
|
||||||
(col-list column-list)
|
(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
|
;; prepend 2 empty rows
|
||||||
(gnc:html-table-prepend-row! html-table '())
|
(gnc:html-table-prepend-row! html-table '())
|
||||||
(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))
|
(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")
|
(gnc:html-table-cell-set-tag! tc "centered-label-cell")
|
||||||
(set! current-col (+ current-col 1))
|
(set! current-col (+ current-col 1))
|
||||||
(set! col-list (cdr col-list))
|
(set! col-list (cdr col-list))
|
||||||
|
Loading…
Reference in New Issue
Block a user