mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Inline gnc:query-set-match-non-voids-only!
Addendum to 683fe2f37 - completion deprecate old function
This commit is contained in:
@@ -30,7 +30,8 @@
|
||||
(define (get-all-splits accounts end-date)
|
||||
(let ((query (qof-query-create-for-splits)))
|
||||
(qof-query-set-book query (gnc-get-current-book))
|
||||
(gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
|
||||
(xaccQueryAddClearedMatch
|
||||
query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
|
||||
(xaccQueryAddAccountMatch query accounts QOF-GUID-MATCH-ANY QOF-QUERY-AND)
|
||||
(xaccQueryAddDateMatchTT query #f 0 (and end-date #t) (or end-date 0) QOF-QUERY-AND)
|
||||
(let ((splits (qof-query-run query)))
|
||||
|
||||
@@ -303,7 +303,8 @@ more than one currency. This report is not designed to cope with this possibilit
|
||||
;; set up the query to get the splits in the chosen account
|
||||
(define (setup-query query account date)
|
||||
(qof-query-set-book query (gnc-get-current-book))
|
||||
(gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
|
||||
(xaccQueryAddClearedMatch
|
||||
query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
|
||||
(xaccQueryAddSingleAccountMatch query account QOF-QUERY-AND)
|
||||
(xaccQueryAddDateMatchTT query #f 0 #t date QOF-QUERY-AND)
|
||||
(qof-query-set-sort-order query
|
||||
|
||||
@@ -338,7 +338,8 @@
|
||||
|
||||
;; for balance purposes, we don't need to do this, but it cleans up
|
||||
;; the table display.
|
||||
(gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
|
||||
(xaccQueryAddClearedMatch
|
||||
query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
|
||||
;; add accounts to the query (include subaccounts
|
||||
;; if requested)
|
||||
(gnc:report-percent-done 25)
|
||||
|
||||
@@ -217,7 +217,8 @@
|
||||
|
||||
;; for balance purposes, we don't need to do this, but it cleans up
|
||||
;; the table display.
|
||||
(gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
|
||||
(xaccQueryAddClearedMatch
|
||||
query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
|
||||
;; add accounts to the query (include subaccounts
|
||||
;; if requested)
|
||||
(gnc:report-percent-done 25)
|
||||
|
||||
@@ -56,7 +56,8 @@
|
||||
;; Register Report properly ignores voided transactions, I'll err
|
||||
;; on the side of safety by excluding them from the query....
|
||||
(qof-query-set-book query (gnc-get-current-book))
|
||||
(gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
|
||||
(xaccQueryAddClearedMatch
|
||||
query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
|
||||
(qof-query-set-sort-order query
|
||||
(list SPLIT-TRANS TRANS-DATE-POSTED)
|
||||
(list QUERY-DEFAULT-SORT)
|
||||
|
||||
@@ -104,7 +104,8 @@
|
||||
(splits
|
||||
(let ((query (qof-query-create-for-splits)))
|
||||
(qof-query-set-book query (gnc-get-current-book))
|
||||
(gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
|
||||
(xaccQueryAddClearedMatch
|
||||
query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
|
||||
(xaccQueryAddSingleAccountMatch query account QOF-QUERY-AND)
|
||||
(xaccQueryAddDateMatchTT query #t from-date #t to-date QOF-QUERY-AND)
|
||||
(filter desc-filter? (qof-query-run query))))
|
||||
|
||||
@@ -70,7 +70,8 @@ exist but have no suitable transactions."))
|
||||
|
||||
(define (setup-query query accounts date)
|
||||
(qof-query-set-book query (gnc-get-current-book))
|
||||
(gnc:query-set-match-non-voids-only! query (gnc-get-current-book))
|
||||
(xaccQueryAddClearedMatch
|
||||
query (logand CLEARED-ALL (lognot CLEARED-VOIDED)) QOF-QUERY-AND)
|
||||
(xaccQueryAddAccountMatch query accounts QOF-GUID-MATCH-ANY QOF-QUERY-AND)
|
||||
(xaccQueryAddDateMatchTT query #f 0 #t date QOF-QUERY-AND)
|
||||
(qof-query-set-sort-order query (list SPLIT-TRANS TRANS-DATE-POSTED) '() '())
|
||||
|
||||
Reference in New Issue
Block a user