gnucash master: Bug 797739 - Tweak Transaction Report Column Defaults
Christopher Lam
clam at code.gnucash.org
Wed Jun 3 07:36:36 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/0281ef2f (commit)
from https://github.com/Gnucash/gnucash/commit/1467f332 (commit)
commit 0281ef2fc544a0addf85b47ddd2da82613461dcc
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Jun 3 18:51:00 2020 +0800
Bug 797739 - Tweak Transaction Report Column Defaults
Tweaks to Transaction Report defaults:
* Account Name: false
* Full Account Name: false
* Other Account Name: true
* Amount: double
Also tweak test-transaction which assumed previous defaults.
diff --git a/gnucash/report/reports/standard/test/test-income-gst.scm b/gnucash/report/reports/standard/test/test-income-gst.scm
index 9222b55d2..9f68effcf 100644
--- a/gnucash/report/reports/standard/test/test-income-gst.scm
+++ b/gnucash/report/reports/standard/test/test-income-gst.scm
@@ -98,6 +98,9 @@
(set-option! options "General" "Table for Exporting" #t)
(set-option! options "General" "Start Date" (cons 'relative 'start-cal-year))
(set-option! options "General" "End Date" (cons 'relative 'end-cal-year))
+ (set-option! options "Display" "Account Name" #t)
+ (set-option! options "Display" "Other Account Name" #f)
+ (set-option! options "Display" "Amount" 'single)
options))
;; This will make all accounts use default currency (I think depends on locale)
diff --git a/gnucash/report/reports/standard/test/test-transaction.scm b/gnucash/report/reports/standard/test/test-transaction.scm
index 5af64492f..09845450a 100644
--- a/gnucash/report/reports/standard/test/test-transaction.scm
+++ b/gnucash/report/reports/standard/test/test-transaction.scm
@@ -166,6 +166,9 @@
(set-option! options "General" "Table for Exporting" #t)
(set-option! options "General" "Start Date" (cons 'relative 'start-cal-year))
(set-option! options "General" "End Date" (cons 'relative 'end-cal-year))
+ (set-option! options "Display" "Account Name" #t)
+ (set-option! options "Display" "Other Account Name" #f)
+ (set-option! options "Display" "Amount" 'single)
options))
;; This will make all accounts use default currency (I think depends on locale)
diff --git a/gnucash/report/trep-engine.scm b/gnucash/report/trep-engine.scm
index 06089707f..52c815aae 100644
--- a/gnucash/report/trep-engine.scm
+++ b/gnucash/report/trep-engine.scm
@@ -885,12 +885,13 @@ be excluded from periodic reporting.")
;; Display options
(let ((disp-memo? #t)
- (disp-accname? #t)
- (disp-other-accname? #f)
- (detail-is-single? #t)
- (amount-value 'single))
+ (disp-accname? #f)
+ (disp-other-accname? #t)
+ (disp-detail-level? 'single)
+ (amount-value 'double))
(define (apply-selectable-by-name-display-options)
+ (define detail-is-single? (eq? disp-detail-level? 'single))
(gnc-option-db-set-option-selectable-by-name
options gnc:pagename-display (N_ "Use Full Account Name")
disp-accname?)
@@ -963,7 +964,7 @@ be excluded from periodic reporting.")
(gnc:register-trep-option
(gnc:make-complex-boolean-option
gnc:pagename-display (N_ "Memo")
- "d" (_ "Display the memo?") #t
+ "d" (_ "Display the memo?") disp-memo?
disp-memo?
(lambda (x)
(set! disp-memo? x)
@@ -973,7 +974,7 @@ be excluded from periodic reporting.")
(gnc:register-trep-option
(gnc:make-complex-boolean-option
gnc:pagename-display (N_ "Account Name")
- "e" (_ "Display the account name?") #t
+ "e" (_ "Display the account name?") disp-accname?
disp-accname?
(lambda (x)
(set! disp-accname? x)
@@ -983,7 +984,7 @@ be excluded from periodic reporting.")
(gnc:register-trep-option
(gnc:make-complex-boolean-option
gnc:pagename-display (N_ "Other Account Name")
- "h5" (_ "Display the other account name? (if this is a split transaction, this parameter is guessed).") #f
+ "h5" (_ "Display the other account name? (if this is a split transaction, this parameter is guessed).") disp-other-accname?
disp-other-accname?
(lambda (x)
(set! disp-other-accname? x)
@@ -993,7 +994,7 @@ be excluded from periodic reporting.")
(gnc:make-multichoice-callback-option
gnc:pagename-display optname-detail-level
"h" (_ "Amount of detail to display per transaction.")
- 'single
+ disp-detail-level?
(list (vector 'multi-line
(_ "Multi-Line")
(_ "Display all splits in a transaction on a separate line."))
@@ -1002,7 +1003,7 @@ be excluded from periodic reporting.")
(_ "Display one line per transaction, merging multiple splits where required.")))
#f
(lambda (x)
- (set! detail-is-single? (eq? x 'single))
+ (set! disp-detail-level? x)
(apply-selectable-by-name-display-options))))
(gnc:register-trep-option
Summary of changes:
.../report/reports/standard/test/test-income-gst.scm | 3 +++
.../report/reports/standard/test/test-transaction.scm | 3 +++
gnucash/report/trep-engine.scm | 19 ++++++++++---------
3 files changed, 16 insertions(+), 9 deletions(-)
More information about the gnucash-changes
mailing list