mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'maint-balsheet-pnl-reverse-chrono' into maint #834
This commit is contained in:
commit
200d4d8e2e
@ -62,6 +62,9 @@ https://bugs.gnucash.org/")))
|
||||
(define optname-period (N_ "Period duration"))
|
||||
(define opthelp-period (N_ "Duration between time periods"))
|
||||
|
||||
(define optname-reverse-chrono (N_ "Period order is most recent first"))
|
||||
(define opthelp-reverse-chrono (N_ "Period order is most recent first"))
|
||||
|
||||
(define optname-dual-columns (N_ "Enable dual columns"))
|
||||
(define opthelp-dual-columns (N_ "Selecting this option will enable double-column \
|
||||
reporting."))
|
||||
@ -202,6 +205,8 @@ also show overall period profit & loss."))
|
||||
options
|
||||
gnc:pagename-general optname-dual-columns
|
||||
(not x))
|
||||
(gnc-option-db-set-option-selectable-by-name
|
||||
options gnc:pagename-general optname-reverse-chrono x)
|
||||
(case report-type
|
||||
((balsheet)
|
||||
(gnc-option-db-set-option-selectable-by-name
|
||||
@ -229,6 +234,11 @@ also show overall period profit & loss."))
|
||||
gnc:pagename-general optname-dual-columns
|
||||
"c4" opthelp-dual-columns #t))
|
||||
|
||||
(add-option
|
||||
(gnc:make-simple-boolean-option
|
||||
gnc:pagename-general optname-reverse-chrono
|
||||
"c5" opthelp-reverse-chrono #t))
|
||||
|
||||
(add-option
|
||||
(gnc:make-multichoice-option
|
||||
gnc:pagename-general optname-options-summary
|
||||
@ -350,6 +360,7 @@ also show overall period profit & loss."))
|
||||
|
||||
(define* (add-multicolumn-acct-table
|
||||
table title accountlist maxindent get-cell-monetary-fn cols-data #:key
|
||||
(reverse-cols? #f)
|
||||
(omit-zb-bals? #f)
|
||||
(show-zb-accts? #t)
|
||||
(disable-account-indent? #f)
|
||||
@ -427,7 +438,7 @@ also show overall period profit & loss."))
|
||||
(list account-cell)
|
||||
(gnc:html-make-empty-cells
|
||||
(if amount-indenting? (1- amount-indent) 0))
|
||||
rest
|
||||
(if reverse-cols? (reverse rest) rest)
|
||||
(gnc:html-make-empty-cells
|
||||
(if amount-indenting? (- maxindent amount-indent) 0)))))
|
||||
(if row-markup
|
||||
@ -749,6 +760,8 @@ also show overall period profit & loss."))
|
||||
((eq? report-type 'pnl) (list startdate enddate))
|
||||
(else (list enddate))))
|
||||
|
||||
(reverse-chrono? (get-option gnc:pagename-general optname-reverse-chrono))
|
||||
|
||||
(report-dates-vec (list->vector report-dates))
|
||||
(num-report-dates (vector-length report-dates-vec))
|
||||
|
||||
@ -1057,6 +1070,7 @@ also show overall period profit & loss."))
|
||||
table title accounts
|
||||
maxindent get-cell-monetary-fn
|
||||
(iota num-report-dates)
|
||||
#:reverse-cols? reverse-chrono?
|
||||
#:omit-zb-bals? omit-zb-bals?
|
||||
#:show-zb-accts? show-zb-accts?
|
||||
#:disable-account-indent? disable-account-indent?
|
||||
@ -1231,6 +1245,7 @@ also show overall period profit & loss."))
|
||||
(> num-report-dates 2))
|
||||
'(overall-period)
|
||||
'()))
|
||||
#:reverse-cols? reverse-chrono?
|
||||
#:omit-zb-bals? omit-zb-bals?
|
||||
#:show-zb-accts? show-zb-accts?
|
||||
#:disable-account-indent? disable-account-indent?
|
||||
|
@ -475,6 +475,7 @@
|
||||
(define (multicol-balsheet-tests)
|
||||
(define (default-testing-options)
|
||||
(let ((options (gnc:make-report-options multicol-balsheet-uuid)))
|
||||
(set-option! options "General" "Period order is most recent first" #f)
|
||||
(set-option! options "General" "Start Date"
|
||||
(cons 'absolute (gnc-dmy2time64 1 1 1970)))
|
||||
(set-option! options "General" "End Date"
|
||||
@ -557,6 +558,7 @@
|
||||
(define (multicol-pnl-tests)
|
||||
(define (default-testing-options)
|
||||
(let ((options (gnc:make-report-options multicol-pnl-uuid)))
|
||||
(set-option! options "General" "Period order is most recent first" #f)
|
||||
(set-option! options "General" "Start Date"
|
||||
(cons 'absolute (gnc-dmy2time64 1 1 1980)))
|
||||
(set-option! options "General" "End Date"
|
||||
|
Loading…
Reference in New Issue
Block a user