r18316 - gnucash/trunk/src/report/standard-reports - Fix bug 591117 - Cash Flow Report's "Depth: All" Option is Broken
Phil Longstaff
plongstaff at code.gnucash.org
Mon Sep 14 19:52:57 EDT 2009
Author: plongstaff
Date: 2009-09-14 19:52:56 -0400 (Mon, 14 Sep 2009)
New Revision: 18316
Trac: http://svn.gnucash.org/trac/changeset/18316
Modified:
gnucash/trunk/src/report/standard-reports/cash-flow.scm
Log:
Fix bug 591117 - Cash Flow Report's "Depth: All" Option is Broken
Patch by David Eisner
Modified: gnucash/trunk/src/report/standard-reports/cash-flow.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/cash-flow.scm 2009-09-14 23:44:49 UTC (rev 18315)
+++ gnucash/trunk/src/report/standard-reports/cash-flow.scm 2009-09-14 23:52:56 UTC (rev 18316)
@@ -180,14 +180,12 @@
(define (account-full-name<? a b)
(string<? (gnc-account-get-full-name a) (gnc-account-get-full-name b)))
- ;; helper for account depth
+ ;; return maximum depth over accounts and their children, if any
(define (accounts-get-children-depth accounts)
(apply max
(map (lambda (acct)
- (let ((children (gnc-account-get-children acct)))
- (if (null? children)
- 1
- (+ 1 (accounts-get-children-depth children)))))
+ (let ((acct-depth (gnc-account-get-current-depth acct)))
+ (+ acct-depth (- (gnc-account-get-tree-depth acct) 1))))
accounts)))
More information about the gnucash-changes
mailing list