Skip to content

Commit

Permalink
[commodity-utilities] shorten workload by deduping commodities
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Jan 23, 2023
1 parent ae6efa3 commit c16bde1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gnucash/report/commodity-utilities.scm
Expand Up @@ -229,6 +229,12 @@
(gnc-account-get-descendants-sorted (gnc-get-current-root-account)))
(all-splits (get-all-splits currency-accounts end-date))
(interesting-splits (sort (filter interesting-split? all-splits) date<?))
(commodity-list (sort-and-delete-duplicates
commodity-list
(lambda (a b)
(gnc:string-locale<? (gnc-commodity-get-unique-name a)
(gnc-commodity-get-unique-name b)))
gnc-commodity-equal))
(work-to-do (length commodity-list)))
(map
(lambda (c work-done)
Expand Down

0 comments on commit c16bde1

Please sign in to comment.