mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2002-01-06 Christian Stimming <stimming@tuhh.de>
* src/report/report-system/html-utilities.scm, src/report/standard-reports/*: Added option hyperlink in report warnings. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6522 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f9e8a3ada2
commit
49bc361cd4
@ -1,5 +1,9 @@
|
||||
2002-01-06 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/report/report-system/html-utilities.scm,
|
||||
src/report/standard-reports/*: Added option hyperlink in report
|
||||
warnings.
|
||||
|
||||
* doc/sgml/*/xacc-euro.sgml: Fixed DEM rate as pointed out by
|
||||
Gregor Hoffleit <gregor@hoffleit.de>.
|
||||
|
||||
|
@ -679,7 +679,8 @@
|
||||
|
||||
table))
|
||||
|
||||
(define (gnc:html-make-no-account-warning report-title-string)
|
||||
(define (gnc:html-make-no-account-warning
|
||||
report-title-string report-id)
|
||||
(let ((p (gnc:make-html-text)))
|
||||
(gnc:html-text-append!
|
||||
p
|
||||
@ -689,9 +690,17 @@
|
||||
(gnc:html-markup-h2 (_ "No accounts selected"))
|
||||
(gnc:html-markup-p
|
||||
(_ "This report requires accounts to be selected.")))
|
||||
(if report-id
|
||||
(gnc:html-text-append!
|
||||
p
|
||||
(gnc:html-markup-p
|
||||
(gnc:html-markup-anchor
|
||||
(sprintf #f "gnc-options:report-id=%a" report-id)
|
||||
(_ "Edit report options")))))
|
||||
p))
|
||||
|
||||
(define (gnc:html-make-empty-data-warning report-title-string)
|
||||
(define (gnc:html-make-empty-data-warning
|
||||
report-title-string report-id)
|
||||
(let ((p (gnc:make-html-text)))
|
||||
(gnc:html-text-append!
|
||||
p
|
||||
@ -700,4 +709,11 @@
|
||||
(gnc:html-markup-h2 (_ "No data"))
|
||||
(gnc:html-markup-p
|
||||
(_ "The selected accounts contain no data/transactions (or only zeroes) for the selected time period")))
|
||||
(if report-id
|
||||
(gnc:html-text-append!
|
||||
p
|
||||
(gnc:html-markup-p
|
||||
(gnc:html-markup-anchor
|
||||
(sprintf #f "gnc-options:report-id=%a" report-id)
|
||||
(_ "Edit report options")))))
|
||||
p))
|
||||
|
@ -399,11 +399,13 @@ balance at a given time"))
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning report-title))))
|
||||
(gnc:html-make-empty-data-warning
|
||||
report-title (gnc:report-id report-obj)))))
|
||||
|
||||
(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)))
|
||||
|
||||
|
@ -205,7 +205,8 @@
|
||||
;; error condition: no accounts specified
|
||||
(gnc:html-document-add-object!
|
||||
doc
|
||||
(gnc:html-make-no-account-warning report-title)))
|
||||
(gnc:html-make-no-account-warning
|
||||
report-title (gnc:report-id report-obj))))
|
||||
|
||||
doc))
|
||||
|
||||
|
@ -471,7 +471,7 @@
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning
|
||||
(_ "Average Balance"))))))
|
||||
report-title (gnc:report-id report-obj))))))
|
||||
|
||||
;; make a table (optionally)
|
||||
(if show-table?
|
||||
@ -496,7 +496,8 @@
|
||||
;; if there are no accounts selected...
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-no-account-warning)))
|
||||
(gnc:html-make-no-account-warning
|
||||
report-title (gnc:report-id report-obj))))
|
||||
document))
|
||||
|
||||
(gnc:define-report
|
||||
|
@ -356,7 +356,9 @@
|
||||
;; error condition: no accounts specified
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
doc (gnc:html-make-no-account-warning (_ "Balance Sheet"))))
|
||||
doc
|
||||
(gnc:html-make-no-account-warning
|
||||
(_ "Balance Sheet") (gnc:report-id report-obj))))
|
||||
doc))
|
||||
|
||||
(gnc:define-report
|
||||
|
@ -458,12 +458,14 @@ developing over time"))
|
||||
;; else if empty data
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning report-title))))
|
||||
(gnc:html-make-empty-data-warning
|
||||
report-title (gnc:report-id report-obj)))))
|
||||
|
||||
;; else if no accounts selected
|
||||
;; else if no accounts selected
|
||||
(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))
|
||||
|
||||
|
@ -342,12 +342,14 @@
|
||||
(gnc:html-document-add-object! document chart)
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning report-title))))
|
||||
(gnc:html-make-empty-data-warning
|
||||
report-title (gnc:report-id report-obj)))))
|
||||
|
||||
;; else no accounts selected
|
||||
(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))
|
||||
|
||||
|
@ -204,7 +204,9 @@
|
||||
;; error condition: no accounts specified
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
doc (gnc:html-make-no-account-warning report-title)))
|
||||
doc
|
||||
(gnc:html-make-no-account-warning
|
||||
report-title (gnc:report-id report-obj))))
|
||||
doc))
|
||||
|
||||
(gnc:define-report
|
||||
|
@ -225,8 +225,9 @@
|
||||
|
||||
;if no accounts selected.
|
||||
(gnc:html-document-add-object!
|
||||
document (gnc:html-make-no-account-warning report-title)))
|
||||
|
||||
document
|
||||
(gnc:html-make-no-account-warning
|
||||
report-title (gnc:report-id report-obj))))
|
||||
|
||||
document))
|
||||
|
||||
|
@ -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))
|
||||
;;(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))
|
||||
)
|
||||
;;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 (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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user