mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/report/report-system/commodity-utilities.scm
(gnc:get-match-commodity-splits): quit using gnc:list->glist -- new g-wrap eliminates need. (gnc:get-match-commodity-splits): quit using gnc:glist->list -- new g-wrap eliminates need. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6599 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c4ddf8bb75
commit
1f24378a18
@ -43,9 +43,9 @@
|
||||
|
||||
(gnc:query-set-book query (gnc:get-current-book))
|
||||
(gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
|
||||
(gnc:query-add-account-match
|
||||
query (gnc:list->glist currency-accounts)
|
||||
'acct-match-any 'query-and)
|
||||
(gnc:query-add-account-match query
|
||||
currency-accounts
|
||||
'acct-match-any 'query-and)
|
||||
(gnc:query-add-date-match-timepair
|
||||
query #f end-date-tp #t end-date-tp 'query-and)
|
||||
|
||||
@ -70,17 +70,16 @@
|
||||
commodity trans-comm)
|
||||
(gnc:commodity-equiv?
|
||||
commodity acc-comm)))))
|
||||
(gnc:glist->list
|
||||
(gnc:query-get-splits query)
|
||||
<gnc:Split*>)))
|
||||
(gnc:query-get-splits query)))
|
||||
(gnc:free-query query)
|
||||
splits))
|
||||
|
||||
;; Returns a sorted list of all splits in the 'currency-accounts' up
|
||||
;; to 'end-date-tp' which have the 'commodity' and one other commodity
|
||||
;; involved. The splits are sorted by date.
|
||||
(define (gnc:get-match-commodity-splits-sorted
|
||||
currency-accounts end-date-tp commodity)
|
||||
(define (gnc:get-match-commodity-splits-sorted currency-accounts
|
||||
end-date-tp
|
||||
commodity)
|
||||
(sort (gnc:get-match-commodity-splits currency-accounts
|
||||
end-date-tp commodity)
|
||||
(lambda (a b)
|
||||
@ -91,8 +90,7 @@
|
||||
|
||||
;; Returns a list of all splits in the currency-accounts up to
|
||||
;; end-date which have two *different* commodities involved.
|
||||
(define (gnc:get-all-commodity-splits
|
||||
currency-accounts end-date-tp)
|
||||
(define (gnc:get-all-commodity-splits currency-accounts end-date-tp)
|
||||
(gnc:get-match-commodity-splits currency-accounts end-date-tp #f))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user