gnucash unstable: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Tue Jan 9 13:02:39 EST 2018
Updated via https://github.com/Gnucash/gnucash/commit/e798df07 (commit)
via https://github.com/Gnucash/gnucash/commit/83a313ff (commit)
from https://github.com/Gnucash/gnucash/commit/be02abc8 (commit)
commit e798df07d7911d8cc42dc236c710d00dc3d35b6c
Merge: be02abc 83a313f
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Jan 9 10:01:28 2018 -0800
Merge Chris Lam's 'unstable-fix-category-charts-crash' to unstable.
commit 83a313ff8670a8979b34c00453d4cb338ab28277
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Jan 2 20:51:37 2018 +1100
bugfix: fix crash if acc-depth too low
diff --git a/gnucash/report/standard-reports/category-barchart.scm b/gnucash/report/standard-reports/category-barchart.scm
index cd04b91..dec5e92 100644
--- a/gnucash/report/standard-reports/category-barchart.scm
+++ b/gnucash/report/standard-reports/category-barchart.scm
@@ -288,15 +288,24 @@ developing over time"))
(define (show-acct? a)
(member a accounts))
+ (define tree-depth (if (equal? account-levels 'all)
+ (gnc:get-current-account-tree-depth)
+ account-levels))
+
+ (define the-acount-destination-alist
+ (account-destination-alist accounts account-types tree-depth))
+
;;(gnc:debug accounts)
(if (not (null? accounts))
-
+ (if (null? the-acount-destination-alist)
+ (gnc:html-document-add-object!
+ document
+ (gnc:html-make-empty-data-warning
+ report-title (gnc:report-id report-obj)))
+
;; Define more helper variables.
(let* ((commodity-list #f)
(exchange-fn #f)
- (tree-depth (if (equal? account-levels 'all)
- (gnc:get-current-account-tree-depth)
- account-levels))
(averaging-fraction-func (gnc:date-get-fraction-func averaging-selection))
(interval-fraction-func (gnc:date-get-fraction-func interval))
(averaging-multiplier
@@ -430,10 +439,7 @@ developing over time"))
(define (apply-sign account x)
(if (reverse-balance? account) (gnc:monetary-neg x) x))
(define (calculate-report accounts progress-range)
- (let* ((the-acount-destination-alist (account-destination-alist accounts
- account-types
- tree-depth))
- (account-reformat
+ (let* ((account-reformat
(if do-intervals?
(lambda (account result)
(map (lambda (collector datepair)
@@ -784,7 +790,7 @@ developing over time"))
(gnc:html-document-add-object!
document
(gnc:html-make-empty-data-warning
- report-title (gnc:report-id report-obj)))))
+ report-title (gnc:report-id report-obj))))))
;; else if no accounts selected
(gnc:html-document-add-object!
Summary of changes:
.../report/standard-reports/category-barchart.scm | 24 ++++++++++++++--------
1 file changed, 15 insertions(+), 9 deletions(-)
More information about the gnucash-changes
mailing list