[report-utilities.scm] deprecate gnc:accounts-and-all-descendants

This commit is contained in:
Christopher Lam 2022-04-02 10:26:39 +08:00
parent fae7ea02cd
commit 7cf3a5d93d
2 changed files with 9 additions and 6 deletions

View File

@ -234,9 +234,10 @@
;; Return accountslist *and* their descendant accounts ;; Return accountslist *and* their descendant accounts
(define (gnc:accounts-and-all-descendants accountslist) (define (gnc:accounts-and-all-descendants accountslist)
(sort-and-delete-duplicates (issue-deprecation-warning "gnc:accounts-and-all-descendants is \
(apply append accountslist (map gnc-account-get-descendants accountslist)) now deprecated, use gnc-accounts-and-all-descendants instead. sort \
gnc:account-path-less-p equal?)) with gnc:account-full-name<? if necessary.")
(sort (gnc-accounts-and-all-descendants accountslist) gnc:account-full-name<?))
;;; Here's a statistics collector... Collects max, min, total, and makes ;;; Here's a statistics collector... Collects max, min, total, and makes
;;; it easy to get at the mean. ;;; it easy to get at the mean.

View File

@ -546,9 +546,11 @@
(account-lookup "GBP Savings") (account-lookup "GBP Savings")
(account-lookup "Expenses") (account-lookup "Expenses")
(account-lookup "Fuel")) (account-lookup "Fuel"))
(gnc:accounts-and-all-descendants (sort
(list (account-lookup "Expenses") (gnc-accounts-and-all-descendants
(account-lookup "GBP Bank")))) (list (account-lookup "Expenses")
(account-lookup "GBP Bank")))
gnc:account-full-name<?))
(teardown))) (teardown)))