gnucash maint: Bug 798590 - Transaction report: wrong type argument in position 1

Christopher Lam clam at code.gnucash.org
Sat Aug 6 21:22:44 EDT 2022


Updated	 via  https://github.com/Gnucash/gnucash/commit/e822c12f (commit)
	from  https://github.com/Gnucash/gnucash/commit/bfa0fd18 (commit)



commit e822c12f8bc1b5b6305c81f05b1880fbf1d15410
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun Aug 7 09:22:01 2022 +0800

    Bug 798590 - Transaction report: wrong type argument in position 1
    
    handle single-col subtotals

diff --git a/gnucash/report/trep-engine.scm b/gnucash/report/trep-engine.scm
index 57b4e8973..48e80cdfc 100644
--- a/gnucash/report/trep-engine.scm
+++ b/gnucash/report/trep-engine.scm
@@ -1893,7 +1893,7 @@ be excluded from periodic reporting.")
           (else (gnc:error "unknown sortvalue"))))
   (define list-of-rows (sort (delete 'row-total (grid-rows grid)) <?))
   (define list-of-cols (sort (delete 'col-total (grid-cols grid)) <?))
-  (define row-average-enabled? (pair? (cdr list-of-cols)))
+  (define row-average-enabled? (and (pair? list-of-cols) (pair? (cdr list-of-cols))))
   (define (monetary-div monetary divisor)
     (and monetary
          (let* ((amount (gnc:gnc-monetary-amount monetary))



Summary of changes:
 gnucash/report/trep-engine.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the gnucash-changes mailing list