gnucash maint: Bug 740955 - Correct general journal and general ledger reports to properly handle Use-Split-Action-For-Num option in File->Properties.
J. Alex Aycinena
alex.aycinena at code.gnucash.org
Wed Apr 8 15:24:32 EDT 2015
Updated via https://github.com/Gnucash/gnucash/commit/becec402 (commit)
from https://github.com/Gnucash/gnucash/commit/1d6fd557 (commit)
commit becec4022b64161b66ff61338f133d9d43f769b0
Author: Alex Aycinena <alex.aycinena at gmail.com>
Date: Wed Apr 8 12:13:55 2015 -0700
Bug 740955 - Correct general journal and general ledger reports to properly handle Use-Split-Action-For-Num option in File->Properties.
diff --git a/src/report/standard-reports/general-journal.scm b/src/report/standard-reports/general-journal.scm
index 4653165..b957e90 100644
--- a/src/report/standard-reports/general-journal.scm
+++ b/src/report/standard-reports/general-journal.scm
@@ -105,7 +105,9 @@
;; One list per option here with: option-name, default-value
(list
(list (N_ "Date") #t)
- (list (N_ "Num") #f)
+ (if (qof-book-use-split-action-for-num-field (gnc-get-current-book))
+ (list (N_ "Num/Action") #f)
+ (list (N_ "Num") #f))
(list (N_ "Description") #t)
(list (N_ "Account") #t)
(list (N_ "Shares") #f)
diff --git a/src/report/standard-reports/general-ledger.scm b/src/report/standard-reports/general-ledger.scm
index 1035c15..5da37fe 100644
--- a/src/report/standard-reports/general-ledger.scm
+++ b/src/report/standard-reports/general-ledger.scm
@@ -71,27 +71,50 @@
(lambda (l)
(set-option! gnc:pagename-display (car l) (cadr l)))
;; One list per option here with: option-name, default-value
- (list
- (list (N_ "Date") #t)
- (list (N_ "Reconciled Date") #f)
- (list (N_ "Num") #f)
- (list (N_ "Description") #t)
- (list (N_ "Memo") #f)
- (list (N_ "Account Name") #f)
- (list (N_ "Use Full Account Name") #f)
- (list (N_ "Account Code") #f)
- (list (N_ "Other Account Name") #f)
- (list (N_ "Use Full Other Account Name") #f)
- (list (N_ "Other Account Code") #f)
- (list (N_ "Shares") #f)
- (list (N_ "Price") #f)
- ;; note the "Amount" multichoice option here
- (list (N_ "Amount") 'double)
- (list (N_ "Running Balance") #t)
- (list (N_ "Totals") #f)
- (list (N_ "Sign Reverses") 'credit-accounts)
- )
+ (if (qof-book-use-split-action-for-num-field (gnc-get-current-book))
+ (list
+ (list (N_ "Date") #t)
+ (list (N_ "Reconciled Date") #f)
+ (list (N_ "Num/Action") #f)
+ (list (N_ "Trans Number") #f)
+ (list (N_ "Description") #t)
+ (list (N_ "Memo") #f)
+ (list (N_ "Account Name") #f)
+ (list (N_ "Use Full Account Name") #f)
+ (list (N_ "Account Code") #f)
+ (list (N_ "Other Account Name") #f)
+ (list (N_ "Use Full Other Account Name") #f)
+ (list (N_ "Other Account Code") #f)
+ (list (N_ "Shares") #f)
+ (list (N_ "Price") #f)
+ ;; note the "Amount" multichoice option here
+ (list (N_ "Amount") 'double)
+ (list (N_ "Running Balance") #t)
+ (list (N_ "Totals") #f)
+ (list (N_ "Sign Reverses") 'credit-accounts)
+ )
+ (list
+ (list (N_ "Date") #t)
+ (list (N_ "Reconciled Date") #f)
+ (list (N_ "Num") #f)
+ (list (N_ "Description") #t)
+ (list (N_ "Memo") #f)
+ (list (N_ "Account Name") #f)
+ (list (N_ "Use Full Account Name") #f)
+ (list (N_ "Account Code") #f)
+ (list (N_ "Other Account Name") #f)
+ (list (N_ "Use Full Other Account Name") #f)
+ (list (N_ "Other Account Code") #f)
+ (list (N_ "Shares") #f)
+ (list (N_ "Price") #f)
+ ;; note the "Amount" multichoice option here
+ (list (N_ "Amount") 'double)
+ (list (N_ "Running Balance") #t)
+ (list (N_ "Totals") #f)
+ (list (N_ "Sign Reverses") 'credit-accounts)
+ )
)
+ )
;; set options in the general tab...
(set-option!
Summary of changes:
src/report/standard-reports/general-journal.scm | 4 +-
src/report/standard-reports/general-ledger.scm | 63 +++++++++++++++++--------
2 files changed, 46 insertions(+), 21 deletions(-)
More information about the gnucash-changes
mailing list