|
|
|
|
@ -1054,13 +1054,13 @@ Credit Card, and Income accounts")))))
|
|
|
|
|
name-sortkey name-subtotal name-date-subtotal
|
|
|
|
|
3 2))
|
|
|
|
|
|
|
|
|
|
(define (get-other-account-names account-list)
|
|
|
|
|
( map (lambda (acct) (gnc:account-get-full-name acct)) account-list))
|
|
|
|
|
(define (get-other-account-names account-list)
|
|
|
|
|
( map (lambda (acct) (gnc:account-get-full-name acct)) account-list))
|
|
|
|
|
|
|
|
|
|
(let ((document (gnc:make-html-document))
|
|
|
|
|
(c_account_1 (opt-val gnc:pagename-accounts "Report Accounts"))
|
|
|
|
|
(c_account_2 (opt-val gnc:pagename-accounts "Filter Accounts"))
|
|
|
|
|
(filter-mode (opt-val gnc:pagename-accounts "Filter Type"))
|
|
|
|
|
(c_account_1 (opt-val gnc:pagename-accounts "Report Accounts"))
|
|
|
|
|
(c_account_2 (opt-val gnc:pagename-accounts "Filter Accounts"))
|
|
|
|
|
(filter-mode (opt-val gnc:pagename-accounts "Filter Type"))
|
|
|
|
|
(begindate (gnc:timepair-start-day-time
|
|
|
|
|
(gnc:date-option-absolute-time
|
|
|
|
|
(opt-val gnc:pagename-general "From"))))
|
|
|
|
|
@ -1078,10 +1078,10 @@ Credit Card, and Income accounts")))))
|
|
|
|
|
(splits '())
|
|
|
|
|
(query (gnc:malloc-query)))
|
|
|
|
|
|
|
|
|
|
;;(gnc:warn "accts in trep-renderer:" c_account_1)
|
|
|
|
|
;;(gnc:warn "Report Account names:" (get-other-account-names c_account_1))
|
|
|
|
|
;;(gnc:warn "accts in trep-renderer:" c_account_1)
|
|
|
|
|
;;(gnc:warn "Report Account names:" (get-other-account-names c_account_1))
|
|
|
|
|
|
|
|
|
|
(if (not (or (null? c_account_1) (and-map not c_account_1)))
|
|
|
|
|
(if (not (or (null? c_account_1) (and-map not c_account_1)))
|
|
|
|
|
(begin
|
|
|
|
|
(gnc:query-set-book query (gnc:get-current-book))
|
|
|
|
|
;;(gnc:warn "query is:" query)
|
|
|
|
|
@ -1110,27 +1110,27 @@ Credit Card, and Income accounts")))))
|
|
|
|
|
<gnc:Split*>))
|
|
|
|
|
;;(gnc:warn "Splits in trep-renderer:" splits)
|
|
|
|
|
|
|
|
|
|
;;(gnc:warn "Filter account names:" (get-other-account-names c_account_2))
|
|
|
|
|
|
|
|
|
|
;;This should probably a cond or a case to allow for different filter types.
|
|
|
|
|
;;(gnc:warn "Filter Mode: " filter-mode)
|
|
|
|
|
(if (string=? filter-mode "include")
|
|
|
|
|
(begin
|
|
|
|
|
;;(gnc:warn "Including Filter Accounts")
|
|
|
|
|
(set! splits (filter (lambda (split)
|
|
|
|
|
(member (gnc:split-get-corr-account-full-name split) (get-other-account-names c_account_2)))
|
|
|
|
|
splits))
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
;;(gnc:warn "Filter account names:" (get-other-account-names c_account_2))
|
|
|
|
|
|
|
|
|
|
(if (string=? filter-mode "exclude")
|
|
|
|
|
(begin
|
|
|
|
|
;;(gnc:warn "Excluding Filter Accounts")
|
|
|
|
|
(set! splits (filter (lambda (split)
|
|
|
|
|
(not (member (gnc:split-get-corr-account-full-name split) (get-other-account-names c_account_2))))
|
|
|
|
|
splits))
|
|
|
|
|
)
|
|
|
|
|
;;This should probably a cond or a case to allow for different filter types.
|
|
|
|
|
;;(gnc:warn "Filter Mode: " filter-mode)
|
|
|
|
|
(if (string=? filter-mode "include")
|
|
|
|
|
(begin
|
|
|
|
|
;;(gnc:warn "Including Filter Accounts")
|
|
|
|
|
(set! splits (filter (lambda (split)
|
|
|
|
|
(member (gnc:split-get-corr-account-full-name split) (get-other-account-names c_account_2)))
|
|
|
|
|
splits))
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(if (string=? filter-mode "exclude")
|
|
|
|
|
(begin
|
|
|
|
|
;;(gnc:warn "Excluding Filter Accounts")
|
|
|
|
|
(set! splits (filter (lambda (split)
|
|
|
|
|
(not (member (gnc:split-get-corr-account-full-name split) (get-other-account-names c_account_2))))
|
|
|
|
|
splits))
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(if (not (null? splits))
|
|
|
|
|
(let ((table
|
|
|
|
|
@ -1182,7 +1182,8 @@ match the given time interval and account selection.")))
|
|
|
|
|
|
|
|
|
|
(gnc:html-document-add-object!
|
|
|
|
|
document
|
|
|
|
|
(gnc:html-make-no-account-warning report-title)))
|
|
|
|
|
(gnc:html-make-no-account-warning
|
|
|
|
|
report-title (gnc:report-id report-obj))))
|
|
|
|
|
|
|
|
|
|
document))
|
|
|
|
|
|
|
|
|
|
|