diff --git a/src/scm/report-utilities.scm b/src/scm/report-utilities.scm index a2e3fcdab3..b5e198e2c4 100644 --- a/src/scm/report-utilities.scm +++ b/src/scm/report-utilities.scm @@ -104,9 +104,6 @@ (thunk (gnc:account-get-split account x))) 0 (gnc:account-get-split-count account) 1)) -(define (gnc:group-get-accounts group) - (gnc:group-map-accounts (lambda (a) a) group)) - ;; Pull a scheme list of splits from a C array (define (gnc:convert-split-list split-array) (let loop ((index 0) @@ -118,18 +115,6 @@ (gnc:ith-split split-array (+ index 1)) (cons split slist))))) -;; pull a scheme list of splits from an account -(define (gnc:account-get-split-list account) - (let ((num-splits (gnc:account-get-split-count account))) - (let loop ((index 0) - (split (gnc:account-get-split account 0)) - (slist '())) - (if (= index num-splits) - (reverse slist) - (loop (+ index 1) - (gnc:account-get-split account (+ index 1)) - (cons split slist)))))) - ; (define (gnc:account-transactions-for-each thunk account) ; ;; You must call gnc:group-reset-write-flags on the account group ; ;; before using this... diff --git a/src/scm/report/account-summary.scm b/src/scm/report/account-summary.scm index 8a24df486c..12959195ee 100644 --- a/src/scm/report/account-summary.scm +++ b/src/scm/report/account-summary.scm @@ -46,22 +46,10 @@ "Report Options" "Account" "b" "Report on these account(s)" (lambda () - (let ((current-accounts (gnc:get-current-accounts)) - (num-accounts - (gnc:group-get-num-accounts (gnc:get-current-group)))) - + (let ((current-accounts (gnc:get-current-accounts))) (cond ((not (null? current-accounts)) current-accounts) (else - (let ((acctlist '())) - (gnc:for-loop - (lambda(x) - (set! acctlist - (append! - acctlist - (list (gnc:group-get-account - (gnc:get-current-group) x))))) - 0 num-accounts 1) - acctlist))))) + (gnc:group-get-account-list (gnc:get-current-group)))))) #f #t)) (gnc:register-accsum-option @@ -99,7 +87,8 @@ (else (string-append "" - (apply string-append (map accsum_html-table-col-align lst align-list)) + (apply string-append + (map accsum_html-table-col-align lst align-list)) "")))) ;; Create an html table from a list of rows, each containing @@ -120,12 +109,6 @@ (define (accsum_html-table-footer) "") - ;; the following should be defined in the report-utilities file (Dave put it there I believe). - ;; Just in case I am including it here if your copy of report-utilities doesn't have it - ;; un-comment to use -;; (define (gnc:group-get-accounts group) -;; (gnc:group-map-accounts (lambda (a) a) group)) - (define string-db (gnc:make-string-database)) (define (column-list) @@ -157,7 +140,8 @@ (string-append (gnc:account-get-name account) (acc-sum-table (non-zero-at-date-accounts - (gnc:group-get-accounts children) date) date #t)) + (gnc:group-get-account-list children) date) + date #t)) (gnc:account-get-name account)) (gnc:amount->string acc-bal (gnc:account-value-print-info account #t))))) @@ -176,9 +160,8 @@ ;; all children are included in the calculation (define (account-total-at-date accnts date) (apply + - (map (lambda (account) (d-gnc:account-get-balance-at-date account date #t)) accnts)) - ) - + (map (lambda (account) + (d-gnc:account-get-balance-at-date account date #t)) accnts))) (define (accsum-renderer options) (let ((acctcurrency "USD") diff --git a/src/scm/report/average-balance.scm b/src/scm/report/average-balance.scm index 028e284c5e..dea2dc9cb9 100644 --- a/src/scm/report/average-balance.scm +++ b/src/scm/report/average-balance.scm @@ -82,10 +82,7 @@ "Report Options" "Account" "d" "Do transaction report on this account" (lambda () - (let ((current-accounts (gnc:get-current-accounts)) - (num-accounts - (gnc:group-get-num-accounts (gnc:get-current-group)))) - + (let ((current-accounts (gnc:get-current-accounts))) (cond ((not (null? current-accounts)) current-accounts) (else (gnc:group-get-account-list (gnc:get-current-group))))))