Fix three wrapper-related bugs found and patched by Mike Alexander

<mta@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



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15046 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Chris Shoemaker 2006-10-19 23:58:03 +00:00
parent d4ca5bee62
commit 96ce3a8d56
3 changed files with 5 additions and 5 deletions

View File

@ -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))))))

View File

@ -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

View File

@ -923,7 +923,7 @@ Credit Card, and Income accounts")))))
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 @@ Credit Card, and Income accounts")))))
#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))