mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
For income accounts, reverse sign of "difference" column so that positive values are good (more
than budget). git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18233 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1fc2b2067e
commit
7f402b4fb8
@ -260,10 +260,13 @@
|
||||
(dif-numeric-val (gnc-numeric-sub bgt-numeric-val
|
||||
act-numeric-val GNC-DENOM-AUTO
|
||||
(+ GNC-DENOM-LCD GNC-RND-NEVER)))
|
||||
(dif-val (if bgt-unset? "."
|
||||
(gnc:make-gnc-monetary comm dif-numeric-val)))
|
||||
(dif-val #f)
|
||||
)
|
||||
|
||||
(if (eq? ACCT-TYPE-INCOME (xaccAccountGetType acct))
|
||||
(set! dif-numeric-val (gnc-numeric-neg dif-numeric-val)))
|
||||
(set! dif-val (if (and bgt-unset? (gnc-numeric-zero-p act-numeric-val)) "."
|
||||
(gnc:make-gnc-monetary comm dif-numeric-val)))
|
||||
(if (not bgt-unset?)
|
||||
(begin
|
||||
(set! bgt-total (gnc-numeric-add bgt-total bgt-numeric-val GNC-DENOM-AUTO GNC-RND-ROUND))
|
||||
@ -316,13 +319,19 @@
|
||||
)
|
||||
)
|
||||
(if show-diff?
|
||||
(let* ((diff-val
|
||||
(let* ((dif-total
|
||||
(gnc-numeric-sub bgt-total
|
||||
act-total GNC-DENOM-AUTO
|
||||
(+ GNC-DENOM-LCD GNC-RND-NEVER))))
|
||||
(+ GNC-DENOM-LCD GNC-RND-NEVER)))
|
||||
(dif-val #f)
|
||||
)
|
||||
(if (eq? ACCT-TYPE-INCOME (xaccAccountGetType acct))
|
||||
(set! dif-total (gnc-numeric-neg dif-total)))
|
||||
(set! dif-val (if (and bgt-total-unset? (gnc-numeric-zero-p act-total)) "."
|
||||
(gnc:make-gnc-monetary comm dif-total)))
|
||||
(gnc:html-table-set-cell/tag!
|
||||
html-table rownum current-col (total-number-cell-tag diff-val)
|
||||
(if bgt-total-unset? "." (gnc:make-gnc-monetary comm diff-val))
|
||||
html-table rownum current-col (total-number-cell-tag dif-total)
|
||||
dif-val
|
||||
)
|
||||
(set! current-col (+ current-col 1))
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user