r15046 - gnucash/trunk/src - Fix three wrapper-related bugs found and patched by Mike Alexander

Chris Shoemaker chris at cvs.gnucash.org
Thu Oct 19 19:58:04 EDT 2006


Author: chris
Date: 2006-10-19 19:58:03 -0400 (Thu, 19 Oct 2006)
New Revision: 15046
Trac: http://svn.gnucash.org/trac/changeset/15046

Modified:
   gnucash/trunk/src/engine/engine-interface.scm
   gnucash/trunk/src/report/standard-reports/register.scm
   gnucash/trunk/src/report/standard-reports/transaction.scm
Log:
Fix three wrapper-related bugs found and patched by Mike Alexander 
<mta at umich.edu>.

1) Since the output of (xaccTransGetSplit ...) may now be '(), check for it
with (null? ...).

2) Fix the result of a sed mis-ordering:
s/gnc:query-get-splits/qof-query-run/g
s/gnc:query-get-splits-unique-trans/xaccQueryGetSplitsUniqueTrans/g

3) Fix the result of a sed typo:
s/gnc:split-corr-account-fullname/SPLIT-CORR-ACCT-FULLNAME/g
which should've been
s/gnc:split-corr-account-fullname/SPLIT-CORR-ACCT-NAME/g



Modified: gnucash/trunk/src/engine/engine-interface.scm
===================================================================
--- gnucash/trunk/src/engine/engine-interface.scm	2006-10-19 08:18:34 UTC (rev 15045)
+++ gnucash/trunk/src/engine/engine-interface.scm	2006-10-19 23:58:03 UTC (rev 15046)
@@ -219,7 +219,7 @@
 (define (gnc:transaction->transaction-scm trans use-cut-semantics?)
   (define (trans-splits i)
     (let ((split (xaccTransGetSplit trans i)))
-      (if (not split)
+      (if (null? split)
           '()
           (cons (gnc:split->split-scm split use-cut-semantics?)
                 (trans-splits (+ i 1))))))

Modified: gnucash/trunk/src/report/standard-reports/register.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/register.scm	2006-10-19 08:18:34 UTC (rev 15045)
+++ gnucash/trunk/src/report/standard-reports/register.scm	2006-10-19 23:58:03 UTC (rev 15046)
@@ -374,7 +374,7 @@
   (define (add-other-split-rows split table used-columns row-style)
     (define (other-rows-driver split parent table used-columns i)
       (let ((current (xaccTransGetSplit parent i)))
-        (if current
+        (if (not (null? current))
             (begin
               (add-split-row table current used-columns row-style #f #t #f)
               (other-rows-driver split parent table
@@ -564,7 +564,7 @@
     (qof-query-set-book query (gnc-get-current-book))
 
     (set! splits (if journal?
-                     (qof-query-run-unique-trans query)
+                     (xaccQueryGetSplitsUniqueTrans query)
                      (qof-query-run query)))
 
     (set! table (make-split-table splits

Modified: gnucash/trunk/src/report/standard-reports/transaction.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/transaction.scm	2006-10-19 08:18:34 UTC (rev 15045)
+++ gnucash/trunk/src/report/standard-reports/transaction.scm	2006-10-19 23:58:03 UTC (rev 15046)
@@ -923,7 +923,7 @@
                                 row-style account-types-to-reverse)
     (define (other-rows-driver split parent table used-columns i)
       (let ((current (xaccTransGetSplit parent i)))
-        (cond ((not current) #f)
+        (cond ((null? current) #f)
               ((equal? current split)
                (other-rows-driver split parent table used-columns (+ i 1)))
               (else (begin
@@ -1142,7 +1142,7 @@
                                   #f #f #f))
             (cons 'corresponding-acc-name
                                  (vector
-                                  (list SPLIT-CORR-ACCT-FULLNAME)
+                                  (list SPLIT-CORR-ACCT-NAME)
                                   split-same-corr-account-full-name-p 
                                   render-corresponding-account-subheading
                                   render-corresponding-account-subtotal))



More information about the gnucash-changes mailing list