mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[average-balance] destroy the query after using it
also fix comments and whitespace
This commit is contained in:
parent
9b9d264a04
commit
bc553ed00e
@ -260,6 +260,7 @@
|
|||||||
(exchange-fn monetary target-curr date)))))
|
(exchange-fn monetary target-curr date)))))
|
||||||
daily-dates
|
daily-dates
|
||||||
accounts-balances-transposed)))
|
accounts-balances-transposed)))
|
||||||
|
(qof-query-destroy query)
|
||||||
|
|
||||||
;; this is a complicated tight loop. start with:
|
;; this is a complicated tight loop. start with:
|
||||||
;; daily-balances & daily-dates, interval-dates, and the
|
;; daily-balances & daily-dates, interval-dates, and the
|
||||||
@ -307,9 +308,9 @@
|
|||||||
(apply + (filter positive? interval-amts))
|
(apply + (filter positive? interval-amts))
|
||||||
(- (apply + (filter negative? interval-amts)))
|
(- (apply + (filter negative? interval-amts)))
|
||||||
(apply + interval-amts))
|
(apply + interval-amts))
|
||||||
results)
|
results) ;process interval amts&bals
|
||||||
'()
|
'() ;reset interval-bals
|
||||||
'()
|
'() ;and interval-amts
|
||||||
splits
|
splits
|
||||||
daily-balances
|
daily-balances
|
||||||
daily-dates
|
daily-dates
|
||||||
|
@ -46,17 +46,12 @@
|
|||||||
(define (test-average-balance)
|
(define (test-average-balance)
|
||||||
(let* ((env (create-test-env))
|
(let* ((env (create-test-env))
|
||||||
(account-alist (env-create-account-structure-alist env structure))
|
(account-alist (env-create-account-structure-alist env structure))
|
||||||
(options (gnc:make-report-options uuid))
|
(options (gnc:make-report-options uuid))
|
||||||
(bank (cdr (assoc "Bank" account-alist)))
|
(bank (cdr (assoc "Bank" account-alist)))
|
||||||
(bank2 (cdr (assoc "Another Bank" account-alist)))
|
(bank2 (cdr (assoc "Another Bank" account-alist)))
|
||||||
(income (cdr (assoc "Income" account-alist))))
|
(income (cdr (assoc "Income" account-alist))))
|
||||||
|
|
||||||
(define (default-testing-options)
|
(define (default-testing-options)
|
||||||
;; To ease testing of transaction report, we will set default
|
|
||||||
;; options for generating reports. We will elable extra columns
|
|
||||||
;; for Exporting, disable generation of informational text, and
|
|
||||||
;; disable indenting. These options will be tested separately as
|
|
||||||
;; the first test group. By default, we'll select the modern dates.
|
|
||||||
(let ((options (gnc:make-report-options uuid)))
|
(let ((options (gnc:make-report-options uuid)))
|
||||||
(set-option! options "Accounts" "Accounts" (list bank bank2))
|
(set-option! options "Accounts" "Accounts" (list bank bank2))
|
||||||
(set-option! options "Display" "Show table" #t)
|
(set-option! options "Display" "Show table" #t)
|
||||||
|
Loading…
Reference in New Issue
Block a user