gnucash maint: Bug 798499 - Expense Chart data tables include extra columns of data

Christopher Lam clam at code.gnucash.org
Tue Apr 5 10:44:14 EDT 2022


Updated	 via  https://github.com/Gnucash/gnucash/commit/3125352d (commit)
	from  https://github.com/Gnucash/gnucash/commit/3df7bdf3 (commit)



commit 3125352d5a2339b17628818c8490521b360f7163
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Tue Apr 5 22:29:21 2022 +0800

    Bug 798499 - Expense Chart data tables include extra columns of data
    
    Because all-data was shortened when it exceeds the max-sliecs, but
    list-of-rows and row-totals were not redefined.
    
    Delay list-of-rows and row-totals until after all-data is pruned.

diff --git a/gnucash/report/reports/standard/category-barchart.scm b/gnucash/report/reports/standard/category-barchart.scm
index 283e33bdb..6e35961dd 100644
--- a/gnucash/report/reports/standard/category-barchart.scm
+++ b/gnucash/report/reports/standard/category-barchart.scm
@@ -526,10 +526,8 @@ Please deselect the accounts with negative balances."))
                                  (list-head dates-list (1- (length dates-list)))
                                  dates-list))
                  (date-string-list (map qof-print-date dates-list))
-                 (list-of-rows (apply zip (map cadr all-data)))
-
-                 ;; total amounts
-                 (row-totals (map (cut fold + 0 <>) list-of-rows)))
+                 (list-of-rows #f)
+                 (row-totals #f))
 
             ;; Set chart title, subtitle etc.
             (gnc:html-chart-set-type!
@@ -578,6 +576,8 @@ Please deselect the accounts with negative balances."))
                       (gnc:report-anchor-text
                        (gnc:make-report reportguid options))))))
 
+            (set! list-of-rows (apply zip (map cadr all-data)))
+            (set! row-totals (map (cut fold + 0 <>) list-of-rows))
             (gnc:report-percent-done 92)
 
             (for-each



Summary of changes:
 gnucash/report/reports/standard/category-barchart.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list