[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
(define (gnc:accounts-and-all-descendants accountslist)
(sort-and-delete-duplicates
(apply append accountslist (map gnc-account-get-descendants accountslist))
gnc:account-path-less-p equal?))
(issue-deprecation-warning "gnc:accounts-and-all-descendants is \
now deprecated, use gnc-accounts-and-all-descendants instead. sort \
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
;;; it easy to get at the mean.

View File

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