gnucash maint: Addendum fix error introduced in refactor
Christopher Lam
clam at code.gnucash.org
Thu Jan 14 10:33:16 EST 2021
Updated via https://github.com/Gnucash/gnucash/commit/51d3f92c (commit)
from https://github.com/Gnucash/gnucash/commit/8a0f9c55 (commit)
commit 51d3f92c79efc24cb9360310b8f3a89026662f61
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Thu Jan 14 23:30:44 2021 +0800
Addendum fix error introduced in refactor
6605a6eb6 had another error -- work-to-do was defined *after* the
all-data definition, the latter uses it heavily for
progress-chart. work-to-do must be defined before its use when
defining all-data.
diff --git a/gnucash/report/reports/standard/category-barchart.scm b/gnucash/report/reports/standard/category-barchart.scm
index ddce5ef9d..db79626f8 100644
--- a/gnucash/report/reports/standard/category-barchart.scm
+++ b/gnucash/report/reports/standard/category-barchart.scm
@@ -256,6 +256,7 @@ developing over time"))
(work-done 0)
(work-to-do 0)
+ (all-data #f)
(show-table? (get-option gnc:pagename-display (N_ "Show table")))
(document (gnc:make-html-document))
(chart (gnc:make-html-chart))
@@ -468,8 +469,10 @@ developing over time"))
(list a (account->balance-list a #t)))
(filter show-acct? accts))))
+ (set! work-to-do (count-accounts 1 topl-accounts))
+
;; Sort the account list according to the account code field.
- (define all-data
+ (set! all-data
(sort
(filter (lambda (l)
(not (zero? (gnc:gnc-monetary-amount
@@ -492,8 +495,6 @@ developing over time"))
(> (gnc:gnc-monetary-amount (apply gnc:monetary+ (cadr a)))
(gnc:gnc-monetary-amount (apply gnc:monetary+ (cadr b)))))))))
- (set! work-to-do (count-accounts 1 topl-accounts))
-
(cond
((or (null? all-data) (all-zeros (map cadr all-data)))
(gnc:html-document-add-object!
Summary of changes:
gnucash/report/reports/standard/category-barchart.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list