gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Wed Oct 7 08:48:36 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/af9f7c85 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d6d06d45 (commit)
	from  https://github.com/Gnucash/gnucash/commit/4905ffc8 (commit)



commit af9f7c85d4eb465d6b5cc987f84884412f030892
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Wed Oct 7 20:40:58 2020 +0800

    [general-journal.scm] allow General/Title to render document title.
    
    Previously would always override title with "General Journal". Modify
    so that Report Title is set by default to "General Journal", but is
    modifiable and will be rendered appropriately by the renderer.

diff --git a/gnucash/report/reports/standard/general-journal.scm b/gnucash/report/reports/standard/general-journal.scm
index 8b04f51b6..9d1e31d5d 100644
--- a/gnucash/report/reports/standard/general-journal.scm
+++ b/gnucash/report/reports/standard/general-journal.scm
@@ -102,16 +102,15 @@
       (list (N_ "Running Balance") #f)
       (list (N_ "Totals") #f)))
 
+    (set-option! gnc:pagename-general "Title" (G_ reportname))
     options))
 
 ;; report renderer
 
 (define (general-journal-renderer report-obj)
   ;; just delegate rendering to the Register Report renderer...
-  (let* ((renderer (gnc:report-template-renderer/report-guid regrptguid #f))
-         (doc (renderer report-obj)))
-    (gnc:html-document-set-title! doc (G_ reportname))
-    doc))
+  (let ((renderer (gnc:report-template-renderer/report-guid regrptguid #f)))
+    (renderer report-obj)))
 
 (gnc:define-report
  'version 1

commit d6d06d45de2fceb88da688a6f1a6b8545ea56d9a
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Wed Oct 7 20:45:17 2020 +0800

    [general-journal.scm] fix whitespace

diff --git a/gnucash/report/reports/standard/general-journal.scm b/gnucash/report/reports/standard/general-journal.scm
index c2c25f785..8b04f51b6 100644
--- a/gnucash/report/reports/standard/general-journal.scm
+++ b/gnucash/report/reports/standard/general-journal.scm
@@ -41,15 +41,14 @@
 ;; options generator
 
 (define (general-journal-options-generator)
-  
+
   (let* ((options (gnc:report-template-new-options/report-guid regrptguid regrptname))
-	 (query (qof-query-create-for-splits))
-	 )
-    
+         (query (qof-query-create-for-splits)))
+
     (define (set-option! section name value)
       (gnc:option-set-default-value
        (gnc:lookup-option options section name) value))
-    
+
     ;; Match, by default, all non-void transactions ever recorded in
     ;; all accounts....  Whether or not to match void transactions,
     ;; however, may be of issue here. Since I don't know if the
@@ -59,9 +58,9 @@
     (xaccQueryAddClearedMatch
      query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
     (qof-query-set-sort-order query
-			      (list SPLIT-TRANS TRANS-DATE-POSTED)
-			      (list QUERY-DEFAULT-SORT)
-			      '())
+                              (list SPLIT-TRANS TRANS-DATE-POSTED)
+                              (list QUERY-DEFAULT-SORT)
+                              '())
     (qof-query-set-sort-increasing query #t #t #t)
 
     (xaccQueryAddAccountMatch
@@ -81,9 +80,7 @@
       (list "journal" #t)
       (list "double" #t)
       (list "debit-string" (G_ "Debit"))
-      (list "credit-string" (G_ "Credit"))
-      )
-     )
+      (list "credit-string" (G_ "Credit"))))
     ;; we'll leave query malloc'd in case this is required by the C side...
 
     ;; set options in the display tab...
@@ -103,12 +100,9 @@
       ;; note the "Amount" multichoice option here
       (list (N_ "Amount") 'double)
       (list (N_ "Running Balance") #f)
-      (list (N_ "Totals") #f)
-      )
-     )
-    
-    options)
-  )
+      (list (N_ "Totals") #f)))
+
+    options))
 
 ;; report renderer
 
@@ -119,7 +113,7 @@
     (gnc:html-document-set-title! doc (G_ reportname))
     doc))
 
-(gnc:define-report 
+(gnc:define-report
  'version 1
  'name reportname
  'report-guid "25455562bd234dd0b048ecc5a8af9e43"
@@ -129,4 +123,3 @@
  )
 
 ;; END
-



Summary of changes:
 .../report/reports/standard/general-journal.scm    | 38 +++++++++-------------
 1 file changed, 15 insertions(+), 23 deletions(-)



More information about the gnucash-changes mailing list