mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
cashflow: use the much faster gnc:account-get-trans-type-splits-interval
This retrieves all the splits we need, and much faster.
This commit is contained in:
parent
8d12338244
commit
526fd82ca8
@ -405,7 +405,8 @@
|
||||
(money-out-alist '())
|
||||
(money-out-collector (gnc:make-commodity-collector))
|
||||
|
||||
(splits-to-do (gnc:accounts-count-splits accounts))
|
||||
(all-splits (gnc:account-get-trans-type-splits-interval accounts '() from-date-tp to-date-tp))
|
||||
(splits-to-do (length all-splits))
|
||||
(seen-split-list '())
|
||||
(work-done 0))
|
||||
|
||||
@ -499,12 +500,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define (calc-money-in-out-internal accounts-internal)
|
||||
(if (not (null? accounts-internal))
|
||||
(let* ((current (car accounts-internal))
|
||||
(rest (cdr accounts-internal)))
|
||||
(for-each work-per-split (xaccAccountGetSplitList current))
|
||||
(calc-money-in-out-internal rest))))
|
||||
(define (calc-money-in-out-internal accounts)
|
||||
(for-each work-per-split all-splits))
|
||||
|
||||
;; And calculate
|
||||
(calc-money-in-out-internal accounts)
|
||||
|
Loading…
Reference in New Issue
Block a user