mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/report/standard-reports/category-barchart.scm: Properly
reverse the balances of accounts instead of using the internal functions to determine when to reverse. Fixes #115268. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8647 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
2447462174
commit
5d0011374d
@ -1,3 +1,9 @@
|
|||||||
|
2003-06-22 Derek Atkins <derek@ihtfp.com>
|
||||||
|
|
||||||
|
* src/report/standard-reports/category-barchart.scm: Properly
|
||||||
|
reverse the balances of accounts instead of using the internal
|
||||||
|
functions to determine when to reverse. Fixes #115268.
|
||||||
|
|
||||||
2003-06-19 Chris Lyttle <chris@wilddev.net>
|
2003-06-19 Chris Lyttle <chris@wilddev.net>
|
||||||
|
|
||||||
* src/scm/help-topics-index.scm: add Jon Lapham's patch
|
* src/scm/help-topics-index.scm: add Jon Lapham's patch
|
||||||
|
@ -82,12 +82,16 @@ developing over time"))
|
|||||||
(define optname-plot-height (N_ "Plot Height"))
|
(define optname-plot-height (N_ "Plot Height"))
|
||||||
(define optname-sort-method (N_ "Sort Method"))
|
(define optname-sort-method (N_ "Sort Method"))
|
||||||
|
|
||||||
(define (options-generator account-types)
|
(define (options-generator account-types reverse-balance?)
|
||||||
(let* ((options (gnc:new-options))
|
(let* ((options (gnc:new-options))
|
||||||
(add-option
|
(add-option
|
||||||
(lambda (new-option)
|
(lambda (new-option)
|
||||||
(gnc:register-option options new-option))))
|
(gnc:register-option options new-option))))
|
||||||
|
|
||||||
|
;; save off the reverse-balance option
|
||||||
|
(add-option
|
||||||
|
(gnc:make-internal-option "__report" "reverse-balance?" reverse-balance?))
|
||||||
|
|
||||||
;; General tab
|
;; General tab
|
||||||
(gnc:options-add-date-interval!
|
(gnc:options-add-date-interval!
|
||||||
options gnc:pagename-general
|
options gnc:pagename-general
|
||||||
@ -200,6 +204,7 @@ developing over time"))
|
|||||||
(height (get-option gnc:pagename-display optname-plot-height))
|
(height (get-option gnc:pagename-display optname-plot-height))
|
||||||
(width (get-option gnc:pagename-display optname-plot-width))
|
(width (get-option gnc:pagename-display optname-plot-width))
|
||||||
(sort-method (get-option gnc:pagename-display optname-sort-method))
|
(sort-method (get-option gnc:pagename-display optname-sort-method))
|
||||||
|
(reverse-balance? (get-option "__report" "reverse-balance?"))
|
||||||
|
|
||||||
(work-done 0)
|
(work-done 0)
|
||||||
(work-to-do 0)
|
(work-to-do 0)
|
||||||
@ -265,7 +270,7 @@ developing over time"))
|
|||||||
;; double, exchanged into the report-currency by the above
|
;; double, exchanged into the report-currency by the above
|
||||||
;; conversion function, and possibly with reversed sign.
|
;; conversion function, and possibly with reversed sign.
|
||||||
(define (get-balance account date-list-entry subacct?)
|
(define (get-balance account date-list-entry subacct?)
|
||||||
((if (gnc:account-reverse-balance? account)
|
((if (reverse-balance? account)
|
||||||
- +)
|
- +)
|
||||||
(if do-intervals?
|
(if do-intervals?
|
||||||
(collector->double
|
(collector->double
|
||||||
@ -531,6 +536,7 @@ developing over time"))
|
|||||||
|
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (l)
|
(lambda (l)
|
||||||
|
(let ((tip-and-rev (cddddr l)))
|
||||||
(gnc:define-report
|
(gnc:define-report
|
||||||
'version 1
|
'version 1
|
||||||
'name (car l)
|
'name (car l)
|
||||||
@ -538,22 +544,22 @@ developing over time"))
|
|||||||
(list gnc:menuname-income-expense)
|
(list gnc:menuname-income-expense)
|
||||||
(list gnc:menuname-asset-liability))
|
(list gnc:menuname-asset-liability))
|
||||||
'menu-name (cadddr l)
|
'menu-name (cadddr l)
|
||||||
'menu-tip (car (cddddr l))
|
'menu-tip (car tip-and-rev)
|
||||||
'options-generator (lambda () (options-generator (cadr l)))
|
'options-generator (lambda () (options-generator (cadr l) (cadr tip-and-rev)))
|
||||||
'renderer (lambda (report-obj)
|
'renderer (lambda (report-obj)
|
||||||
(category-barchart-renderer report-obj
|
(category-barchart-renderer report-obj
|
||||||
(car l)
|
(car l)
|
||||||
(cadr l)
|
(cadr l)
|
||||||
(caddr l)))))
|
(caddr l))))))
|
||||||
(list
|
(list
|
||||||
;; reportname, account-types, do-intervals?,
|
;; reportname, account-types, do-intervals?,
|
||||||
;; menu-reportname, menu-tip
|
;; menu-reportname, menu-tip
|
||||||
(list reportname-income '(income) #t menuname-income menutip-income)
|
(list reportname-income '(income) #t menuname-income menutip-income (lambda (x) #t))
|
||||||
(list reportname-expense '(expense) #t menuname-expense menutip-expense)
|
(list reportname-expense '(expense) #t menuname-expense menutip-expense (lambda (x) #f))
|
||||||
(list reportname-assets
|
(list reportname-assets
|
||||||
'(asset bank cash checking savings money-market receivable
|
'(asset bank cash checking savings money-market receivable
|
||||||
stock mutual-fund currency)
|
stock mutual-fund currency)
|
||||||
#f menuname-assets menutip-assets)
|
#f menuname-assets menutip-assets (lambda (x) #f))
|
||||||
(list reportname-liabilities
|
(list reportname-liabilities
|
||||||
'(liability payable credit credit-line)
|
'(liability payable credit credit-line)
|
||||||
#f menuname-liabilities menutip-liabilities)))
|
#f menuname-liabilities menutip-liabilities (lambda (x) #t))))
|
||||||
|
Loading…
Reference in New Issue
Block a user