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-book query (gnc:get-current-book))
|
||||||
(gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
|
(gnc:query-set-match-non-voids-only! query (gnc:get-current-book))
|
||||||
(gnc:query-add-account-match
|
(gnc:query-add-account-match query
|
||||||
query (gnc:list->glist currency-accounts)
|
currency-accounts
|
||||||
'acct-match-any 'query-and)
|
'acct-match-any 'query-and)
|
||||||
(gnc:query-add-date-match-timepair
|
(gnc:query-add-date-match-timepair
|
||||||
query #f end-date-tp #t end-date-tp 'query-and)
|
query #f end-date-tp #t end-date-tp 'query-and)
|
||||||
|
|
||||||
@ -70,17 +70,16 @@
|
|||||||
commodity trans-comm)
|
commodity trans-comm)
|
||||||
(gnc:commodity-equiv?
|
(gnc:commodity-equiv?
|
||||||
commodity acc-comm)))))
|
commodity acc-comm)))))
|
||||||
(gnc:glist->list
|
(gnc:query-get-splits query)))
|
||||||
(gnc:query-get-splits query)
|
|
||||||
<gnc:Split*>)))
|
|
||||||
(gnc:free-query query)
|
(gnc:free-query query)
|
||||||
splits))
|
splits))
|
||||||
|
|
||||||
;; Returns a sorted list of all splits in the 'currency-accounts' up
|
;; Returns a sorted list of all splits in the 'currency-accounts' up
|
||||||
;; to 'end-date-tp' which have the 'commodity' and one other commodity
|
;; to 'end-date-tp' which have the 'commodity' and one other commodity
|
||||||
;; involved. The splits are sorted by date.
|
;; involved. The splits are sorted by date.
|
||||||
(define (gnc:get-match-commodity-splits-sorted
|
(define (gnc:get-match-commodity-splits-sorted currency-accounts
|
||||||
currency-accounts end-date-tp commodity)
|
end-date-tp
|
||||||
|
commodity)
|
||||||
(sort (gnc:get-match-commodity-splits currency-accounts
|
(sort (gnc:get-match-commodity-splits currency-accounts
|
||||||
end-date-tp commodity)
|
end-date-tp commodity)
|
||||||
(lambda (a b)
|
(lambda (a b)
|
||||||
@ -91,8 +90,7 @@
|
|||||||
|
|
||||||
;; Returns a list of all splits in the currency-accounts up to
|
;; Returns a list of all splits in the currency-accounts up to
|
||||||
;; end-date which have two *different* commodities involved.
|
;; end-date which have two *different* commodities involved.
|
||||||
(define (gnc:get-all-commodity-splits
|
(define (gnc:get-all-commodity-splits currency-accounts end-date-tp)
|
||||||
currency-accounts end-date-tp)
|
|
||||||
(gnc:get-match-commodity-splits currency-accounts end-date-tp #f))
|
(gnc:get-match-commodity-splits currency-accounts end-date-tp #f))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user