Error running cashflow report

Derek Atkins warlord at MIT.EDU
Sun Feb 2 13:44:51 CST 2003

I need to run out, but here is another patch to run -- to help me
debug the problem.  If you could run with this patch and collect
any output from the terminal, I would appreciate it.



Index: src/report/standard-reports/cash-flow.scm
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/cash-flow.scm,v
retrieving revision 1.7
diff -u -r1.7 cash-flow.scm
--- src/report/standard-reports/cash-flow.scm	31 Jan 2003 03:00:50 -0000	1.7
+++ src/report/standard-reports/cash-flow.scm	2 Feb 2003 18:43:24 -0000
@@ -180,7 +180,10 @@
     ;; helper for sorting of account list
     (define (account-full-name<? a b)
-      (string<? (gnc:account-get-full-name a) (gnc:account-get-full-name b)))
+      (cond ((and a b)
+	     (string<? (gnc:account-get-full-name a) (gnc:account-get-full-name b)))
+	    ((not b) #f)
+	    (#t #t)))
     ;; helper for account depth
     (define (account-get-depth account)
@@ -267,6 +270,12 @@
                                        (s-amount (gnc:split-get-amount s))
                                        (s-value (gnc:split-get-value s))
                                        (s-commodity (gnc:account-get-commodity s-account)))
+				  (if (not s-account)
+				      (display "WARNING: s-account is NULL!\n")
+				      (if (not (gnc:account-get-full name
+								     s-account))
+					  (display "WARNING: s-account has NULL FULLNAME!\n")))
                                   ;(gnc:debug (gnc:account-get-name s-account))
                                   (if (not (account-in-list? s-account accounts))
 				      (if (not (split-in-list? s seen-split-list))

       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list